1
votes

After creating a simple nginx deployment, my pod status shows as "PENDING". When I run kubectl get pods command, I get the following:

NAME                                READY   STATUS    RESTARTS   AGE
nginx-deployment-6b474476c4-dq26w   0/1     Pending   0          50m
nginx-deployment-6b474476c4-wjblx   0/1     Pending   0          50m

If I check on my node health, I get:

Taints:             node.kubernetes.io/disk-pressure:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  kubernetes-master
  AcquireTime:     <unset>
  RenewTime:       Wed, 05 Aug 2020 12:43:57 +0530
Conditions:
  Type                 Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----                 ------  -----------------                 ------------------                ------                       -------
  NetworkUnavailable   False   Wed, 05 Aug 2020 09:12:31 +0530   Wed, 05 Aug 2020 09:12:31 +0530   CalicoIsUp                   Calico is running on this node
  MemoryPressure       False   Wed, 05 Aug 2020 12:43:36 +0530   Tue, 04 Aug 2020 23:01:43 +0530   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure         True    Wed, 05 Aug 2020 12:43:36 +0530   Tue, 04 Aug 2020 23:02:06 +0530   KubeletHasDiskPressure       kubelet has disk pressure
  PIDPressure          False   Wed, 05 Aug 2020 12:43:36 +0530   Tue, 04 Aug 2020 23:01:43 +0530   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready                True    Wed, 05 Aug 2020 12:43:36 +0530   Tue, 04 Aug 2020 23:02:06 +0530   KubeletReady                 kubelet is posting ready status. AppArmor enabled
1
Did you wonder why does it happen? Did you see this kubernetes docs ?Matt

1 Answers

1
votes

You can remove the taint for disk pressure using below command but ideally you need to investigate why kubelet is reporting disk pressure . The node may be out of disk space.

kubectl taint nodes <nodename> node.kubernetes.io/disk-pressure-

This will get you out of pending state of the nginx pods.