{
  "id": "policy/kubernetes-pod-eviction-resource-quota",
  "signature": "Pod \"my-pod\" evicted due to resource quota: the pod has been evicted because its resource usage exceeds the quota for the namespace",
  "signature_zh": "Pod \"my-pod\" 因资源配额被驱逐：Pod 已被驱逐，因为其资源使用量超过了命名空间的配额",
  "regex": "Pod.*evicted due to resource quota",
  "domain": "policy",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Kubernetes ResourceQuota enforces limits on total CPU/memory per namespace; a pod exceeding its request/limit triggers eviction when cumulative usage hits the quota.",
  "root_cause_type": "generic",
  "root_cause_zh": "Kubernetes ResourceQuota 对每个命名空间的总 CPU/内存实施限制；当累计使用量达到配额时，超过其请求/限制的 Pod 会触发驱逐。",
  "versions": [
    {
      "version": "Kubernetes v1.28",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kubernetes v1.29",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubelet v1.28.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Simply restarting the pod without adjusting resource limits causes immediate re-eviction.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing the pod's resource requests without checking namespace quota may still fail if the quota is already maxed out.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting the ResourceQuota object to bypass limits can lead to resource starvation for other pods.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check current namespace quota usage: kubectl describe quota -n <namespace>. Then reduce pod resource requests/limits to fit within available quota, e.g., in deployment YAML set resources.requests.cpu: \"250m\" and resources.requests.memory: \"256Mi\".",
      "success_rate": 0.85,
      "how": "Check current namespace quota usage: kubectl describe quota -n <namespace>. Then reduce pod resource requests/limits to fit within available quota, e.g., in deployment YAML set resources.requests.cpu: \"250m\" and resources.requests.memory: \"256Mi\".",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the namespace ResourceQuota by editing it: kubectl edit quota <quota-name> -n <namespace> and raising spec.hard.cpu or spec.hard.memory.",
      "success_rate": 0.8,
      "how": "Increase the namespace ResourceQuota by editing it: kubectl edit quota <quota-name> -n <namespace> and raising spec.hard.cpu or spec.hard.memory.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use cluster autoscaling or node scaling to add more resources, then adjust quota accordingly.",
      "success_rate": 0.7,
      "how": "Use cluster autoscaling or node scaling to add more resources, then adjust quota accordingly.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "检查当前命名空间配额使用情况：kubectl describe quota -n <namespace>。然后减少 Pod 资源请求/限制以适配可用配额，例如在部署 YAML 中设置 resources.requests.cpu: \"250m\" 和 resources.requests.memory: \"256Mi\"。",
    "通过编辑增加命名空间 ResourceQuota：kubectl edit quota <quota-name> -n <namespace> 并提高 spec.hard.cpu 或 spec.hard.memory。",
    "使用集群自动缩放或节点缩放添加更多资源，然后相应调整配额。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kubernetes.io/docs/concepts/policy/resource-quotas/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}