[root@hadoop03 k8s]# kubectl  get pods
NAME                     READY   STATUS    RESTARTS   AGE
nginx-controller-7c9j9   0/1     Pending   0          13m
nginx-controller-pfnr7   0/1     Pending   0          13m
[root@hadoop03 k8s]# kubectl  describe  pod nginx-controller-7c9j9
Name:           nginx-controller-7c9j9
Namespace:      default
Priority:       0
Node:           <none>
Labels:         name=nginx
Annotations:    <none>
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicationController/nginx-controller
Containers:
  nginx:
    Image:        hadoop03:5000/nginx
    Port:         80/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-l52v6 (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  kube-api-access-l52v6:
    Type:                    Projected (a volume that contains injected data from multiple so                                                        urces)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  10s (x14 over 13m)  default-scheduler  0/1 nodes are available:                                                         1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
[root@hadoop03 k8s]#  kubectl taint nodes --all node-role.kubernetes.io/master-
node/hadoop03 untainted

[root@hadoop03 k8s]# kubectl  describe  pod nginx-controller-7c9j9
Name:           nginx-controller-7c9j9
Namespace:      default
Priority:       0
Node:           hadoop03/192.168.153.103
Start Time:     Wed, 03 Nov 2021 15:34:10 +0800
Labels:         name=nginx
Annotations:    <none>
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicationController/nginx-controller
Containers:
  nginx:
    Container ID:
    Image:          hadoop03:5000/nginx
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-l52v6 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  kube-api-access-l52v6:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  75s (x15 over 15m)  default-scheduler  0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
  Normal   Scheduled         3s                  default-scheduler  Successfully assigned default/nginx-controller-7c9j9 to hadoop03

######################################
###
######################################
[root@hadoop03 k8s]# kubectl  get pods
NAME                     READY   STATUS              RESTARTS   AGE
nginx-controller-7c9j9   0/1     ContainerCreating   0          15m
nginx-controller-pfnr7   0/1     ContainerCreating   0          15m
[root@hadoop03 k8s]# kubectl  get pods
NAME                     READY   STATUS    RESTARTS   AGE
nginx-controller-7c9j9   1/1     Running   0          16m
nginx-controller-pfnr7   1/1     Running   0          16m

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐