Pending pod cannot be scheduled onto a node.
Performing command kubectl describe pod <pod_name> will help you undestand the problem.
kubectl logs <pod> can also be helpful.
Common reasons for pods getting stuck in Pending State are:
1) When the pod requesting more resources than are available, for example a pod has set a request for an amount of CPU or that is not available anywhere on any node. For example: requesting a 8 CPU cores when all your nodes only have 4 CPU cores. Doing a kubectl describe node <node> on each node will also show already requested resources.
2) There are taints that prevent a pod from scheduling on your nodes.
3) The nodes have been marked unschedulable with kubectl cordon
4) There are no Ready nodes. kubectl get nodes will display the status of all nodes.
$ kubectl get po requests-pod-3
NAME READY STATUS RESTARTS AGE
requests-pod-3 0/1 Pending 0 4m
Examining why a pod is stuck at Pending with kubectl describe pod
$ kubectl describe po requests-pod-3
Name: requests-pod-3
Namespace: default
Node: /
...
Conditions:
Type Status
PodScheduled False
...
Events:
... Warning FailedScheduling No nodes are available
that match all of the
following predicates::
Insufficient cpu (1).