This error occurs when you try to create pods in a namespace that has reached its ResourceQuota limit for maximum number of pods.
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.
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"}}}'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)
No subnets found for EKS cluster
How to fix "eks subnet not found" in Kubernetes
unable to compute replica count
How to fix "unable to compute replica count" in Kubernetes HPA
error: context not found
How to fix "error: context not found" in Kubernetes
default backend - 404
How to fix "default backend - 404" in Kubernetes Ingress
serviceaccount cannot list resource
How to fix "serviceaccount cannot list resource" in Kubernetes