# failed to allocate for range 0: no IP addresses available in range: 10.244.0.0/16

- **ID:** `kubernetes/pod-network-ip-exhaustion`
- **Domain:** kubernetes
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

The pod CIDR range is exhausted because too many pods are scheduled or there's a leak in IP address release, often due to a CNI plugin bug.

## Workarounds

1. **Flush the CNI IPAM database: For Calico, run 'calicoctl ipam release --ip=<specific-ip>' or 'calicoctl ipam release --all' to release unused IPs.** (75% success)
   ```
   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.** (80% success)
   ```
   Scale down unnecessary deployments to free pod IPs: 'kubectl scale deployment <name> --replicas=0' then scale back up.
   ```

## Dead Ends

- **Restart all pods to release IPs** — Restarting pods doesn't force the CNI to release stale IPs; the allocation table remains full. (80% fail)
- **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% fail)
