When creating a vSphere Kubernetes Service (VKS) Kubernetes cluster from VMware Cloud Foundation Automation (VCFA), the cluster remains stuck in Failed state with vSphere Kubernetes service status showing as Not Available and does not progress past the first control plane node. This issue also affects Private AI (PAIS) clusters.
While connected to the Supervisor cluster context, the following symptoms are observed:
kubectl get machine,vm -o wide -n <namespace>
kubectl describe cluster <cluster name> -n <namespace>
message: |- Addon DNS is not ready: unable to reconcile kubeadm ConfigMap's CoreDNS info: unable to retrieve kubeadm Configmap from the guest cluster: failed to get server groups: Get "https://<control plane endpoint IP>:6443/api?timeout=10s": dial tcp <control plane endpoint IP>:6443: connect: connection refused Addon KubeProxy is not ready: unable to retrieve kube-proxy daemonset from the guest cluster: failed to get server groups: Get "https://<control plane endpoint IP>:6443/api?timeout=10s": dial tcp <control plane endpoint IP>:6443: connect: connection refusedThe <control plane endpoint IP> corresponds to the Control Plane Endpoint at port 6443 automatically assigned to the cluster on creation.kubectl get cluster -o yaml <cluster name> -n <namespace> | grep -i endpoint -A2
couldn't get server api group list
Get "https://<control plane endpoint IP>:6443/api/v1/namespaces/default/configmaps/<kubernetes cluster>-kapp-controller.app.apps.k14s.io": dial tcp <control plane endpoint IP>:6443: connect: connection refused
Get "https://<control plane endpoint IP>:6443/api/v1/namespaces/default/configmaps/<kubernetes cluster>-kapp-controller.app.apps.k14s.io": tls: failed to verify certificate: x509: certificate is valid for <IP A>, <IP B>, <IP C>, <localhost>, not <control plane endpoint IP>
kubectl get services -A | grep "<control plane endpoint IP>"
<namespace> <kubernetes cluster> LoadBalancer <internal IP> <control plane endpoint IP> 6443/TCP
kube-system kube-apiserver-lb-svc LoadBalancer <internal IP> <control plane endpoint IP>
In VMware Cloud Foundation Automation | Provider Management under Networking - External IP Blocks, one or more external IP blocks is using the same CIDR as the above external IP addresses of the kubernetes services in the Supervisor cluster.
In the vSphere web UI, the Supervisor cluster's Configure - Network - Workload Networks External IP Block is the same CIDR as the above External IP Block noted in VCFA | Provider Management.
The VCFA External IP Block and Supervisor cluster are in the same Region.
vSphere Supervisor 9.X
VMware Cloud Foundation Automation 9.1
The VCFA External IP block used by the same Region as Supervisor cluster is using the same duplicate CIDR as the Supervisor cluster's Workload Networks External IP block.
The control plane endpoint for the created Kubernetes cluster uses the CIDR from the VCFA external IP Block defined for the same region.
This creates duplicate IP conflicts where the control plane endpoint of any Kubernetes clusters can be the same as the external IP address of a Supervisor cluster's service.
The control plane endpoint of a Kubernetes cluster is used to contact the kube-apiserver of the Kubernetes cluster which is needed for cluster management including initial deployment.
Kubernetes cluster creation will fail if the system is unable to create or reach the kube-apiserver container process expected to be deployed in the new Kubernetes cluster.
No containers will be able to run in the new Kubernetes cluster.
In VCFA | Provider Management, correct the existing external IP block so that does not overlap or duplicate the external IP block used by the Supervisor cluster's Workload Network.
So long as there are no other duplicate or overlapping CIDR blocks or networking misconfiguration that would result in similar behavior, the next kubernetes cluster deployment should use the corrected external IP block to assign its control plane endpoint and create successfully.
The Supervisor Cluster's Workload Networks - Services CIDR decides the internal IPs for the Kubernetes services on the Supervisor cluster.
The Supervisor Cluster's Workload Networks - External IP Blocks defines the external IPs for the Kubernetes services on the Supervisor cluster.
The external IP for a Kubernetes Cluster's Control Plane Endpoint pulls from the VCFA external IP block defined for the same Region that the Supervisor cluster is associated with.