FailedCreatePodSandBox
cloud
resource_error
ai_generated
true
警告 FailedCreatePodSandBox:创建Pod沙箱失败:rpc错误:代码=未知 描述=无法为Pod设置沙箱容器""网络:networkPlugin cni无法为Pod "my-pod_default"设置网络:网络中没有可用IP地址
Warning FailedCreatePodSandBox: Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "" network for pod "my-pod": networkPlugin cni failed to set up pod "my-pod_default" network: no IP addresses available in network
ID: cloud/azure-aks-pod-creation-pending-no-ip
85%修复率
87%置信度
1证据数
2023-09-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| AKS 1.26 | active | — | — | — |
| AKS 1.27 | active | — | — | — |
| Azure CNI | active | — | — | — |
根因分析
Azure Kubernetes Service (AKS)节点池已耗尽子网IP地址范围,阻止新Pod分配IP地址。
English
Azure Kubernetes Service (AKS) node pool has exhausted its subnet IP address range, preventing new pods from being assigned IP addresses.
官方文档
https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools解决方案
-
Increase the subnet size by adding a new subnet and updating the AKS cluster to use it. First, create a new subnet: `az network vnet subnet create --resource-group my-rg --vnet-name my-vnet --name new-subnet --address-prefixes 10.0.1.0/24` Then update the node pool: `az aks nodepool update --resource-group my-rg --cluster-name my-cluster --name my-nodepool --vnet-subnet-id /subscriptions/.../subnets/new-subnet`
-
Delete unused pods to free IPs. Use `kubectl delete pod <pod-name>` for non-critical pods. Then monitor with `kubectl get pods -o wide` to see IP reclamation.
无效尝试
常见但无效的做法:
-
Restart the AKS cluster
95% 失败
Restarting does not free up IP addresses; the subnet is still full.
-
Scale down the node pool to reduce node count
80% 失败
Scaling down reduces nodes but does not reclaim IPs from existing pods. Pod IPs remain allocated until pods are deleted.