分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

使用kubernetes创建容器一直处于ContainerCreating状态的原因查找与解决

发布时间:2023-09-06 01:58责任编辑:傅花花关键词:kubernetes
[root@k8s-master demo]# kubectl get pod

NAME      READY     STATUS              RESTARTS   AGE

busybox   0/1       ContainerCreating   0          12m


[root@k8s-master demo]# kubectl describe pod busybox

Name:           busybox

Namespace:      default

Node:           k8s-node-1/10.0.0.12

Start Time:     Thu, 07 Jun 2018 09:53:48 +0800

Labels:         <none>

Status:         Pending

IP:

Controllers:    <none>

Containers:

  busybox:

    Container ID:

    Image:       10.0.0.10:5000/busybox

    Image ID:

    Port:

    Command:

      sleep

      3600

    State:       Waiting

      Reason:    ContainerCreating

    Ready:       False

    Restart Count:    0

    Volume Mounts:    <none>

    Environment Variables:  <none>

Conditions:

  Type        Status

  Initialized   True 

  Ready       False 

  PodScheduled  True 

No volumes.

QoS Class:      BestEffort

Tolerations:    <none>

Events:

FirstSeen  LastSeen  Count  From           SubObjectPath   Type      Reason    Message

---------  --------  -----  ----           -------------   --------   ------      -------

 15m     15m       1   {default-scheduler }            Normal    Scheduled    Successfully assigned busybox to k8s-node-1

 15m     22s      64   {kubelet k8s-node-1}            Warning    FailedSync   Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"registry.access.redhat.com/rhel7/pod-infrastructure:latest\""

 15m    11s       8    {kubelet k8s-node-1}            Warning FailedSync      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)"


看到registry.access.redhat.com/rhel7/pod-infrastructure:latest感觉很奇怪,我设置的仓库是grc.io,为什么去拉取这个镜像,怀疑是不是什么没有安装好。尝试运行docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest,提示redhat-ca.crt: no such file or directory。ls查看改文件是个软连接,链接目标是/etc/rhsm,查看没有rhsm,尝试安装yum install *rhsm*,出现相关软件,感觉比较符合,所以安装查看产生了/etc/rhsm文件夹。

再次运行kubectl get pods

NAME                 READY     STATUS    RESTARTS   AGE
redis-master-qhd12   1/1       Running   0          13m






使用kubernetes创建容器一直处于ContainerCreating状态的原因查找与解决

原文地址:http://blog.51cto.com/sf1314/2125850

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved