How to fix Insufficient pods in Kubernetes
This error occurs when you try to create pods in a namespace that has reached its ResourceQuota limit for maximum number of pods.
Quick fix
Fixes Insufficient pods
kubectl describe resourcequota -n <namespace>- Check current quota usage
- List all pods in the namespace
- Delete unused or completed pods
- Scale down unnecessary deployments
kubectl describe resourcequota -n <namespace>Insufficient pods
What this error means
The "exceeded quota: pods" error indicates that you've hit the ResourceQuota limit for the maximum number of pods allowed in a namespace. ResourceQuota is a namespace-level policy that restricts resource consumption, including the total count of pods. When you reach this limit, the Kubernetes API server denies any new pod creation requests. Deployments will show fewer ready replicas than desired, and new pods will fail to create with a quota exceeded error. The error message clearly shows the quota state: "requested: pods=1, used: pods=10, limited: pods=10" tells you exactly how many pods exist versus the limit.
Typical symptoms
- Pod creation fails with "exceeded quota: pods" error
- Deployment shows fewer ready replicas than desired
- kubectl run or kubectl create fails immediately
- Jobs or CronJobs fail to create pods
- Horizontal Pod Autoscaler cannot scale up
Common causes
- Namespace has a ResourceQuota with a pods limit
- Too many pods from previous deployments still running
- Failed or completed pods still counting toward quota
- Multiple deployments competing for limited pod quota
- Rolling updates temporarily exceeding quota
How to fix "Insufficient pods"
View the ResourceQuota to see current usage vs limits:
kubectl describe resourcequota -n <namespace>Output shows:
Name: pod-quota
Namespace: my-namespace
Resource Used Hard
-------- ---- ----
pods 10 10Identify pods consuming quota:
kubectl get pods -n <namespace>
# Include completed/failed pods
kubectl get pods -n <namespace> --field-selector=status.phase!=RunningRemove pods that are no longer needed:
# Delete completed pods
kubectl delete pods -n <namespace> --field-selector=status.phase==Succeeded
# Delete failed pods
kubectl delete pods -n <namespace> --field-selector=status.phase==Failed
# Delete specific unused pods
kubectl delete pod <pod-name> -n <namespace>Reduce replicas on deployments you don't need at full scale:
# List deployments with replica counts
kubectl get deployments -n <namespace>
# Scale down
kubectl scale deployment <name> -n <namespace> --replicas=1If you legitimately need more pods, request a quota increase from your cluster admin:
# Admin command to increase quota
kubectl patch resourcequota <quota-name> -n <namespace> \
-p '{"spec":{"hard":{"pods":"20"}}}'Advanced notes
ResourceQuota enforcement happens at API request time—rejected pods don't enter a pending queue; the request is denied outright. This differs from scheduling failures where pods are created but remain Pending.
Terminal pods (Failed/Succeeded) still count toward quota until deleted. Configure automatic cleanup with:
apiVersion: batch/v1
kind: Job
spec:
ttlSecondsAfterFinished: 3600 # Auto-delete 1 hour after completionDuring rolling updates, both old and new pods exist simultaneously. If your quota equals your desired replicas, updates will fail. Set quota higher than replicas to allow headroom:
- Desired replicas: 10
- Recommended quota: 12-15 (allows rolling updates)
Frequently asked questions
- What does "Insufficient pods" mean?
- The "exceeded quota: pods" error indicates that you've hit the ResourceQuota limit for the maximum number of pods allowed in a namespace. ResourceQuota is a namespace-level policy that restricts resource consumption, including the total count of pods. When you reach this limit, the Kubernetes API server denies any new pod creation requests.
- How do I fix "Insufficient pods"?
- This error occurs when you try to create pods in a namespace that has reached its ResourceQuota limit for maximum number of pods.
- What causes "Insufficient pods"?
- Namespace has a ResourceQuota with a pods limit Too many pods from previous deployments still running Failed or completed pods still counting toward quota
- Is the "Insufficient pods" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚Kubernetes Official Documentation
- 📖Kubernetes: Horizontal Pod Autoscaling(Official Docs)
- 📖GKE: Troubleshoot cluster autoscaler(Official Docs)
- 🐙