前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >关于k8s起pod报错:details(open /etc/doc..no such file

关于k8s起pod报错:details(open /etc/doc..no such file

原创
作者头像
风起--追风
发布2022-02-17 17:20:17
8730
发布2022-02-17 17:20:17
举报
文章被收录于专栏:sql与spec性能sql与spec性能

一.报错环境:

  1. 创建了RC文件,kubectl get pods显示 pod一直处于ContainerCreating
  2. kubectl describe pod mysql-3k3x0

发现:

报错:Error syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because there are no credentials on this request. details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)"

分析:1.image pullbackoff 镜像拉取失败(docker images 已存在该镜像,排除)

2.details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)"(已定位)

二.解决方案

  1. /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt是一个软连接指向/etc/rhsm/ca/redhat-uep.pem,但实际并不存在所以需要:yum insall -y *rhsm*

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem

docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

2. 重新启动kubelet服务

systemctl restart kubelet

3. 删除原来的RC文件

kubectl delete -f mysql-rc.yaml(若删除不了直接rm -f)

4. 重新生成新的RC文件

5. 查看效果并能正常启动

kubectl get pods

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 一.报错环境:
  • 二.解决方案
相关产品与服务
容器服务
腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档