Newly created VKS cluster is failing to complete provisioning
search cancel

Newly created VKS cluster is failing to complete provisioning

book

Article ID: 416254

calendar_today

Updated On:

Products

Tanzu Kubernetes Runtime

Issue/Introduction

When attempting to deploy a VKS cluster, the deployment becomes stuck in provisioning.
You see an error similar to the following error message when running the following command within the Supervisor - kubectl get <VKS-Cluster> -n <namespace>

lastTransitionTime: "YYYY-MM-DDTHH:MM:SS"
    message: 'error reading current state of the Cluster topology: failed to read
      VSphereCluster/: failed to retrieve VSphereCluster "" in namespace "##-###-###-###":
      failed to retrieve VSphereCluster external object "##-###-###-###"/"": VSphereCluster.vmware.infrastructure.cluster.#-###.io
      "" not found'


Environment

vSphere Kubernetes  Service

Cause

The deployment YAML is misconfigured. In the case of the error above, the infrastructure reference field is missing a cluster name for VSphereCluster:

  controlPlaneRef:
    apiVersion: controlplane.cluster.x-k8s.io/v1beta1
    kind: KubeadmControlPlane
    namespace: <namespace>
  infrastructureRef:
    apiVersion: vmware.infrastructure.cluster.x-k8s.io/v1beta1
    kind: VSphereCluster
    namespace: <namespace>

Resolution

Please confirm that the deployment yaml is correctly configured and fix any malformed key pairs or remove them if unnecessary.