Tuesday, January 26, 2021

POD - deploy error - role.kubernetes.io/master: }, that the pod didn't tolerate.

 kubectl taint nodes  mildevkub020 node-role.kubernetes.io/master-


[root@master .kube]# kc get pods
NAME                            READY   STATUS    RESTARTS   AGE
myapp-pod                       0/2     Pending   0          15m
mydep-5dcf7bcbd6-2gxjb          0/1     Pending   0          3h49m
myweb-deploy-6c55897859-695gs   0/1     Pending   0          3h39m
myweb-deploy-6c55897859-89hs4   0/1     Pending   0          3h39m
myweb-deploy-6c55897859-xh8vb   0/1     Pending   0          3h39m
nginx                           0/1     Pending   0          78m


[root@master .kube]# kc describe pod myapp-pod
Name:         myapp-pod
Namespace:    default
Priority:     0
Node:         <none>
Labels:       app=myapp
Annotations:  Status:  Pending
IP:
IPs:          <none>
Containers:
  nginx-container:
    Image:        nginx
    Port:         <none>
    Host Port:    <none>
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-br827 (ro)
  backend-container:
    Image:        redis
    Port:         <none>
    Host Port:    <none>
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-br827 (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  default-token-br827:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-br827
    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
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  68s (x12 over 16m)  default-scheduler  0/1 nodes are available: 1 node(s) had taint                                                                                                                        {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
[root@master .kube]# kc taint nodes master node-role.kubernetes.io/master-
node/master untainted
[root@master .kube]# kc taint nodes master node-role.kubernetes.io/master-
error: taint "node-role.kubernetes.io/master" not found
[root@master .kube]# kc get pods
NAME                            READY   STATUS              RESTARTS   AGE
myapp-pod                       0/2     ContainerCreating   0          18m
mydep-5dcf7bcbd6-2gxjb          1/1     Running             0          3h51m
myweb-deploy-6c55897859-695gs   0/1     ImagePullBackOff    0          3h41m
myweb-deploy-6c55897859-89hs4   0/1     ErrImagePull        0          3h41m
myweb-deploy-6c55897859-xh8vb   0/1     ImagePullBackOff    0          3h41m
nginx                           1/1     Running             0          80m
[root@master .kube]#



No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...