Diagnose Kubernetes native ResourceQuota and LimitRange admission rejections (exceeded quota, forbidden by LimitRange, FailedCreate). Checks namespace quotas, current usage, LimitRange constraints, and ReplicaSet events to identify why pods cannot be created. Not applicable to Volcano Queue — use volcano-queue-diagnose for gang scheduling clusters.
When pods fail to be created due to Kubernetes native namespace-level resource constraints — ResourceQuota exceeded or LimitRange violations — follow this flow to identify the root cause.
Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify ResourceQuota, LimitRange, or pod specs — that should be left to the user or cluster administrator.
When to use: Pods are not being created at all (not Pending, not CrashLoopBackOff — simply missing). Typical trigger: a ReplicaSet or Job shows FailedCreate events mentioning exceeded quota or forbidden: ... LimitRange.
Not applicable to Volcano Queue: If the cluster uses Volcano for gang scheduling, resource quotas are managed by Volcano Queue, not Kubernetes native ResourceQuota. Use the volcano-queue-diagnose skill instead. To check:
kubectl get queue 2>/dev/null
If this command returns results (Queue resources listed), the cluster uses Volcano — use volcano-queue-diagnose. If it returns nothing or an error, Volcano is not installed — continue with this skill.
If the user reports a Deployment not progressing or pods not appearing, first find the controller that owns the pods:
kubectl get rs -n <ns> --sort-by='.metadata.creationTimestamp' | grep <deployment-name>
Then check the ReplicaSet events for creation failures:
kubectl describe rs <new-rs> -n <ns>
Look for events with reason FailedCreate. The event message reveals whether it is a ResourceQuota or LimitRange rejection.
If the user already has a specific error message, skip to step 2.
exceeded quota — ResourceQuota exhaustedThe namespace has a ResourceQuota and creating the pod would exceed the allowed limits.
Check current quota usage:
kubectl get resourcequota -n <ns>
For detailed usage breakdown:
kubectl describe resourcequota -n <ns>
Compare the Used vs Hard columns. Common quota dimensions:
Then check what the pod is requesting:
kubectl get pod -n <ns> -l app=<name> -o jsonpath='{range .items[0].spec.containers[*]}{.name}{"\t"}{.resources}{"\n"}{end}' 2>/dev/null
If no pods exist yet (all creation failed), check the Deployment or template spec:
kubectl get deployment <name> -n <ns> -o jsonpath='{range .spec.template.spec.containers[*]}{.name}{"\t"}{.resources}{"\n"}{end}'
Root cause analysis:
Used is near Hard for cpu/memory: existing pods are consuming most of the quota — need to scale down other workloads or increase quotapods count is at the limit: too many pods in namespace — clean up or increase quotaforbidden: ... minimum cpu/memory — LimitRange minimum violationThe pod's container does not meet the minimum resource request required by the namespace's LimitRange.
kubectl get limitrange -n <ns>
kubectl describe limitrange -n <ns>
Check the Min column for Container type. If a container does not specify resource requests, or its requests are below the minimum, admission will be rejected.
Compare with the pod's resource spec. If the container has no resource requests at all, the LimitRange default will be applied — but if the LimitRange has min without default, admission fails.
forbidden: ... maximum cpu/memory — LimitRange maximum violationThe pod's container exceeds the maximum resource limit allowed by the LimitRange.
Check LimitRange as above and compare the Max column with the container's resource requests/limits.
forbidden: ... maxLimitRequestRatio — LimitRange ratio violationThe ratio between the container's resource limit and request exceeds the allowed ratio (e.g., limit is 10x the request, but ratio cap is 3x).
kubectl describe limitrange -n <ns>
Check the Max Limit/Request Ratio column. Then compare the pod's limits vs requests:
kubectl get deployment <name> -n <ns> -o jsonpath='{range .spec.template.spec.containers[*]}{.name}{"\t requests:"}{.resources.requests}{"\t limits:"}{.resources.limits}{"\n"}{end}'
forbidden: ... no resources specified — Missing required resourcesThe LimitRange requires resource specifications, but the container has none and no defaults are configured.
Check if the LimitRange has Default and DefaultRequest values:
kubectl describe limitrange -n <ns>
If Default and DefaultRequest are empty but Min or Max are set, containers MUST explicitly specify resources.
LimitRange can also enforce constraints at the Pod level (sum of all containers). Check if the LimitRange has a Pod type entry:
kubectl get limitrange -n <ns> -o jsonpath='{range .items[*].spec.limits[*]}{.type}{"\t min:"}{.min}{"\t max:"}{.max}{"\n"}{end}'
If the sum of all container resources exceeds the Pod-level max, admission is rejected.
exceeded quota for storage — PVC quota exhaustedIf the error mentions requests.storage or persistentvolumeclaims:
kubectl describe resourcequota -n <ns>
Check the storage-related rows. Also check if there are per-StorageClass quotas:
kubectl get resourcequota -n <ns> -o yaml
Look for keys like <storageclass>.storageclass.storage.k8s.io/requests.storage.
A namespace can have multiple ResourceQuotas and LimitRanges. Always check for all of them:
kubectl get resourcequota,limitrange -n <ns>
All ResourceQuotas must be satisfied (intersection). The most restrictive LimitRange applies.
ResourceQuotas can be scoped to specific priority classes or pod phases:
kubectl get resourcequota -n <ns> -o yaml
Look for spec.scopes or spec.scopeSelector. A scoped quota only applies to pods matching the scope (e.g., PriorityClass=high). If the user's pod has a specific priority class, it may hit a scoped quota while the general quota still has capacity.
kubectl get pods — look at the controller (ReplicaSet, Job) events instead.pod-pending-debug skill instead — that covers scheduling failures (node resources, taints, affinity).kubectl top pods -n <ns> shows actual resource usage, while quota tracks requested resources. A namespace can hit quota limits even if actual usage is low. Note: kubectl top requires metrics-server to be installed — if it returns an error, skip it and rely on quota Used values instead.