在kubernetes平臺創建pod一直處於ContainerCreating狀態

  • 使用如下命令創建pod
[root@master ~]# kubectl run nginx --image=nginx
kubectl run --generator=deployment/apps.v1beta1 is DEPRECATED and will be removed in a future version. Use kubectl create instead.
deployment.apps/nginx created
[root@master ~]# kubectl get pod
NAME                    READY   STATUS              RESTARTS   AGE
nginx-dbddb74b8-8qt6q   0/1     ContainerCreating   0          11s
  • 一般大概2到3分鐘pod就會創建完畢,但是此處等了十幾分鍾,發現pod不能正常運行
[root@master ~]# kubectl get pods
NAME                    READY   STATUS              RESTARTS   AGE
nginx-dbddb74b8-8qt6q   0/1     ContainerCreating   0          16m
  • 使用如下命令查看該pod的具體信息
[root@master ~]# kubectl get pods
NAME                    READY   STATUS              RESTARTS   AGE
nginx-dbddb74b8-8qt6q   0/1     ContainerCreating   0          16m
[root@master ~]# kubectl describe pod nginx-dbddb74b8-8qt6q
Name:               nginx-dbddb74b8-8qt6q
Namespace:          default
Priority:           0
PriorityClassName:  <none>
Node:               192.168.43.102/192.168.43.102
Start Time:         Wed, 29 Apr 2020 08:52:18 +0800
Labels:             pod-template-hash=dbddb74b8
                    run=nginx
Annotations:        <none>
Status:             Pending
IP:                 
Controlled By:      ReplicaSet/nginx-dbddb74b8
Containers:
  nginx:
    Container ID:   
    Image:          nginx
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-h4tl7 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  default-token-h4tl7:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-h4tl7
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                  Age                 From                     Message
  ----     ------                  ----                ----                     -------
  Normal   Scheduled               18m                 default-scheduler        Successfully assigned default/nginx-dbddb74b8-8qt6q to 192.168.43.102
  Warning  FailedCreatePodSandBox  18m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:43052->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  17m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:56882->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  16m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:55909->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  15m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:50339->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  14m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:32863->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  13m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:41421->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  13m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:40277->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  12m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:40217->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  11m                 kubelet, 192.168.43.102  Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:48980->192.168.43.2:53: i/o timeout
  Warning  FailedCreatePodSandBox  43s (x12 over 10m)  kubelet, 192.168.43.102  (combined from similar events): Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0": Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on 192.168.43.2:53: read udp 192.168.43.102:37778->192.168.43.2:53: i/o timeout
  • 由上述信息可見,是無法訪問阿里雲鏡像倉庫,下載鏡像
  • 即是網絡原因,查看虛機是否能夠正常ping通www.baidu.com
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章