What it means
When a namespace has a ResourceQuota, every new Pod must fit in it, and Pods without requests and limits are refused when the quota covers them. The Deployment shows 0 available, and the reason is in the ReplicaSet's events, not the Deployment's.
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. The quota is used up
Check:
kubectl describe resourcequota -n <ns>
kubectl describe rs -n <ns> | grep -A3 FailedCreate
Fix: Raise the quota or lower requests; clean up unused workloads.
2. Pods have no requests or limits but the quota requires them
Check:
kubectl get deploy <name> -o yaml | grep -A6 resources
Fix: Add requests and limits, or a LimitRange that sets defaults.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
Open the labNo account needed for your first tries.
Related errors
- 0/3 nodes are available: insufficient cpu
No node fits the Pod, so the scheduler leaves it Pending and says why in the events.