Supervisor Upgrade Stuck Due to CSI Driver Missing AvailabilityZone
search cancel

Supervisor Upgrade Stuck Due to CSI Driver Missing AvailabilityZone

book

Article ID: 430108

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • When upgrading a Supervisor Cluster, the upgrade progress stalls or workload clusters remain in a NotReady / Provisioning state. Upon inspecting the vsphere-csi-controller pods in the vmware-system-csi namespace, the pods are found in a CrashLoopBackOff state.

  • Logs from the vsphere-csi-controller container show the following error:

    "level":"error","msg":"failed to run the driver. Err: could not find any AvailabilityZone" "stacktrace":"sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/wcp.(*controller).Init"
  • Running kubectl get availabilityzones returns: No resources found

Environment

  • VMware vSphere Kubernetes Service

Cause

  • During the upgrade, the Workload Control Plane (WCP) service on the vCenter Server fails to synchronize the environment properties (envprops) or its internal reconciliation loop hangs.

  • This prevents the creation of the required AvailabilityZone Custom Resource Definition (CRD) objects in the Supervisor's API, causing the CSI driver initialization to fail.

Resolution

  1. Log into the Supervisor Cluster and check for the existence of Availability Zones: kubectl get availabilityzones

  2. If the command returns No resources found, SSH into the vCenter Server Appliance (VCSA).

  3. Restart the WCP service to force a full scan of the vSphere inventory and re-populate the Supervisor API: service-control --restart wcp

  4. Wait approximately 5 minutes for the service to initialize.

  5. Re-run the check on the Supervisor Cluster: kubectl get availabilityzones, an entry with a status of Ready: True should be seen.

  6. Once the zones are present, restart the CSI deployment to pick up the new configuration: kubectl rollout restart deployment vsphere-csi-controller -n vmware-system-csi

  7. Monitor the pods to ensure they transition to a Running state: kubectl get pods -n vmware-system-csi -w

Additional Information

  • Workload clusters that were stuck in Provisioning should be able to mount disks and complete their rollouts once the CSI controller transitions to a Running state.