The following symptoms and conditions are observed in a guest cluster:
kubectl get pod -A | grep antreakube-system antrea-agent-8jxtr 1/2 CrashLoopBackOff 5 (107s ago) #m##s
kube-system antrea-agent-nrpc8 1/2 CrashLoopBackOff 5 (68s ago) #m##s
kube-system antrea-agent-ns9w8 2/2 Running 0 ###m
kube-system antrea-controller-977ddfd7-x6nfb 1/1 Running 0 ###m
vmware-system-antrea antrea-pre-upgrade-job-g5ssq 0/1 Completed 0 ###mkubectl logs -n kube-system antrea-agent-8jxtrE0116 HH:MM:SS.###### 1 agent.go:911] "Spec.PodCIDR is empty for Node. Please make sure --allocate-node-cidrs is enabled for kube-controller-manager and --cluster-cidr specifies a sufficient CIDR range, or nodeIPAM is enabled for antrea-controller" err="context deadline exceeded" nodeName="#########"
F0116 HH:MM:SS.###### 1 main.go:54] Error running agent: error initializing agent: Spec.PodCIDR is empty for Node #########vSphere with Tanzu
The error "Spec.PodCIDR is empty" occurs because the Kubernetes kube-controller-manager runs out of subnets to assign to new nodes.
A pod CIDR block range of 172.#.#.0/24 supports only one node in the cluster. The first control plane node consumes the only available /24 block, leaving subsequent nodes with no available CIDRs to allocate.
/16 subnet to ensure sufficient IP allocation across all nodes.Refer to the below KB article for more information on changing Service and Pod CIDR ranges in a vSphere Kubernetes Guest Cluster:
Changing Service and Pod CIDR Ranges in vSphere Kubernetes Guest Cluster
Japanese KB: Antrea-agentが"Spec.PodCIDR is empty"というエラーで再起動を繰り返す