# 无法为范围 0 分配：范围 10.244.0.0/16 中没有可用的 IP 地址

- **ID:** `kubernetes/pod-network-ip-exhaustion`
- **领域:** kubernetes
- **类别:** resource_error
- **验证级别:** ai_generated
- **修复率:** 78%

## 根因

Pod CIDR 范围已耗尽，因为调度了太多 pod 或 IP 地址释放存在泄漏，通常是由于 CNI 插件错误。

## 解决方案

1. ```
   Flush the CNI IPAM database: For Calico, run 'calicoctl ipam release --ip=<specific-ip>' or 'calicoctl ipam release --all' to release unused IPs.
   ```
2. ```
   Scale down unnecessary deployments to free pod IPs: 'kubectl scale deployment <name> --replicas=0' then scale back up.
   ```

## 无效尝试

- **Restart all pods to release IPs** — Restarting pods doesn't force the CNI to release stale IPs; the allocation table remains full. (80% 失败率)
- **Increase the pod CIDR size in kube-controller-manager** — Changing CIDR requires cluster reinitialization and doesn't free existing IPs; it's a complex operation with downtime. (70% 失败率)
