A ResourceQuota that counts requests.cpu, limits.memory and the like demands those values from every new pod. If they are missing, the API server rejects the pod right away – and lists every missing field in the message.
Symptom
k run naked --image=nginx:1.29 Error from server (Forbidden): pods "naked" is forbidden: failed quota: team-quota: must specify limits.cpu for: naked; limits.memory for: naked; requests.cpu for: naked; requests.memory for: naked
With a deployment the message doesn't appear on creation but in the ReplicaSet's events – the deployment simply stays below the desired count.
Diagnosis
The quota shows which resources it counts and how much is already used.
k describe quota team-quota Name: team-quota Namespace: tag07 Resource Used Hard -------- ---- ---- count/deployments.apps 0 2 limits.cpu 0 1 limits.memory 0 1Gi pods 0 4 requests.cpu 0 500m requests.memory 0 512Mi
Causes
must specifyThe pod names no requests and limits
Every field the quota counts must be set on the container. The message lists all missing fields per container.
exceeded quotaThe quota is full
The pod names values, but they no longer fit. The message names requested, used and limited.
k get events --field-selector reason=FailedCreate | tail -1 ... exceeded quota: team-quota, requested: requests.cpu=300m, used: requests.cpu=400m, limited: requests.cpu=500m
maximum cpu usageLimitRange maximum exceeded
A LimitRange with max rejects pods whose limit is above it – also at creation time.
Error from server (Forbidden): pods "big" is forbidden: maximum cpu usage per Container is 500m, but limit is 1
Fix
k run naked --image=nginx:1.29
k get pod naked -o jsonpath='{.spec.containers[0].resources}{"\n"}'
limitrange/defaults created
pod/naked created
{"limits":{"cpu":"100m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"32Mi"}}
k set resources deploy api --requests=cpu=50m,memory=32Mi \
--limits=cpu=100m,memory=64Mi
CKAD hands-on, day 7: requests and limits, QoS, in-place resize, ResourceQuota and LimitRange.
Go to day 7 →
FAQ
What helps when the quota is full?
Smaller requests, fewer replicas or a bigger quota.