Unschedulable

Why it's happening

Your cluster is missing the resources to run this pod. Resources can include:

  • CPU cores

  • Memory

  • Nodes (in the case where your cluster has no nodes, or your nodes are being removed from the cluster)

Important: Kubernetes looks at the requested amounts when attempting to schedule a pod before it looks at acutal usage. Your pods may have the Unschedulable error even though there is plenty of actual cpu cores and memory left on the cluster.

Troubleshooting

Insufficient CPU or Memory

In the terminal run kubectl get nodes to list cluster nodes.

View total node allocation: kubectl describe node/<node name>

In this case, we can see that the node is almost saturated (86%), meaning the cluster has no resources.

To free up resource in your cluster:

  1. Reduce your workload's resource requests (see this guide in the official Kubernetes docs)

  2. Remove any non-essential workloads from the cluster

  3. Make sure your cluster has nodes

No nodes

Make sure your cluster has available nodes it can schedule.