Skip to content

Forbidden: exceeded quota

The namespace has a ResourceQuota and creating this pod would exceed it. As with Pod Security, Deployment pods fail on the ReplicaSet, so kubectl apply succeeds and nothing appears.

Or, when the quota covers a resource the pod didn’t specify:

Error creating: pods "api-..." is forbidden: failed quota: team-quota: must specify limits.cpu for: api; limits.memory for: api
Terminal window
kubectl describe resourcequota -n <ns> # used versus hard, per resource
kubectl describe rs -l app=api -n <ns> # the rejection, for Deployment pods
kubectl get limitrange -n <ns> # defaults applied to pods that omit values

If the quota is full, free capacity (scale down or delete unused workloads) or ask for a larger quota. If the pod is rejected for missing requests or limits, set them, or add a LimitRange with defaults to the namespace so pods without values get sensible ones.

During a rolling update, the surge pods count against the quota too, so a namespace at its limit can block rollouts even when the final state would fit.