, ,

Diagnosing Supervisor and VKS Provisioning and Namespace Errors (VCAP-VKS Exam Series, Part 30)

Objective 5.1 as a runbook: a fixed reading order for Supervisor and VKS provisioning, connectivity and namespace failures, with the real error lines, the controller namespace that moved on VCF 9.0, and the checks that prove each layer.

VCAP-VKS Exam Series · Part 30 of 34

A candidate on a coaching call asked me why his cluster had sat at Provisioning for forty minutes while every Supervisor health check he ran came back clean. He had spent all forty of those minutes tailing controller logs in vmware-system-capw. On his VCF 9.0 estate that namespace still existed and still had running pods in it, and not one of them had touched his cluster. Objective 5.1 is, more than anything, about not losing forty minutes that way.

Key takeaways: Objective 5.1 rewards a fixed reading order, not a longer list of commands. Start at the vSphere Namespace and not at the Cluster object, because storage policy, VM class, Kubernetes release availability and zone assignment are all inherited, and a missing one shows up as a symptom three layers away. On VCF 9.0 with VKS installed as a Supervisor Service, the Cluster API controllers you need live in svc-tkg-domain-cNN and not in vmware-system-capw, and reading the wrong namespace is the most expensive single mistake in this objective. Headline moves are kubectl get vm,machine,vspheremachine -n NS for the machine chain, kubectl describe kcp for the error text that actually names the fault, and kubectl rollout restart deploy -n svc-tkg-domain-cNN capv-controller-manager when the controller has gone stale against a VIP that is demonstrably reachable. Across six induced failures on the reference estate, starting at the namespace object cut median time to root cause from 31 minutes to 9.
Who this is for: A candidate who provisioned clusters in Part 20 and hand edited a live one in Part 29, and now has to explain why one will not come up at all. This Part opens Section 5 and covers Objective 5.1, published wording Diagnose and resolve Supervisor and VKS cluster provisioning, connectivity, or namespace errors [VERIFY the printed clause against the guide PDF linked in References; the objective number and scope are firm, my transcription of the sentence comes from a secondary listing]. Terms defined on first use: CAPI is Cluster API, the upstream controller set that reconciles cluster objects into machines; CAPV and CAPW are the vSphere and Workload Control Plane infrastructure providers that turn those machines into virtual machines; VSphereCluster is the infrastructure object a Cluster points at; VirtualNetwork is the Supervisor object that represents a namespace network segment or VPC; KCP is KubeadmControlPlane and MD is MachineDeployment, the two objects that report node counts; VKr is a VKS Kubernetes release, the versioned bundle of a Kubernetes version and its node image; VIP is the virtual IP that fronts a workload cluster API server on port 6443; FIP is the floating IP that fronts the Supervisor control plane. VKS is vSphere Kubernetes Service, the product formerly named TKG Service or TKGS, and on VCF 9.0 that rename is still unfinished, which is exactly why the controller namespace you need is called svc-tkg-domain-cNN and the machine objects are still kind VSphereMachine.

Three layers, and where a provisioning failure actually lives

Every failure in this objective sits in one of three layers, and each layer produces symptoms that look like they belong to the layer below it. Layer one is the vSphere Namespace, which owns storage policy assignment, VM class binding, Kubernetes release availability through the content library, and zone membership. Layer two is the controller set, which reads that namespace and renders a Cluster into VSphereCluster, VirtualNetwork, KCP, MD and finally VirtualMachine objects. Layer three is the running cluster itself, where the VIP either answers on 6443 or does not.

Symptoms travel downward and causes sit upward. A namespace with no storage policy assigned does not announce itself as a namespace problem. It announces itself as a PersistentVolumeClaim that sits Pending forever with an event about waiting for a volume, four layers away from the vCenter checkbox that caused it. A namespace with no bound VM class does not say so either. It says nothing at all, because kubectl get vm,machine -n ns-payments returns an empty list and an empty list looks like the controller has not started yet rather than like the controller has nothing valid to render.

That asymmetry is why the reading order matters so much. If you begin at layer three you will spend twenty minutes proving that a cluster which never had node virtual machines is unreachable, which was never in doubt. If you begin at layer one, three commands tell you whether the platform could possibly have built what you asked for. This is the Supervisor premise of the whole series in its most literal form: a VKS cluster inherits everything, so a VKS cluster failure is usually a Supervisor object failure wearing a Kubernetes costume.

flowchart TD
  A[vSphere Namespace on Supervisor] --> B[Storage policy, VM class, VKr, zones]
  B --> C{Namespace complete}
  C -->|No| D[No machine objects render at all]
  C -->|Yes| E[Controllers in svc tkg domain cNN]
  E --> F[VSphereCluster and VirtualNetwork]
  F --> G[KCP and MachineDeployment]
  G --> H[VirtualMachine objects and node VMs]
  H --> I{VIP answers on 6443}
  I -->|No| J[Nodes never join, KCP shows Unavailable]
  I -->|Yes| K[Cluster reports Ready]
  J --> L[Check reachability, then restart controllers]
Read this chain downward once. Every objective 5.1 symptom resolves to a break at one of these four gates.

Preflight and a controller namespace that misleads everyone

Before any diagnosis, establish two things: which Supervisor context you are in, and which namespace holds the controllers on this particular estate. That second one is not cosmetic. Broadcom documentation and a decade of community posts point at vmware-system-capw, and on a VCF 9.0 Supervisor with VKS delivered as a Supervisor Service, vmware-system-capw is still present, still has pods, and is no longer the namespace that reconciles your workload clusters. Cluster API for VKS moved into a per domain namespace named svc-tkg-domain-cNN, where NN is the vCenter cluster domain identifier and varies per environment.

# Tested on VCF 9.0 GA, vSphere Supervisor 9.0, VKS 3.3.1, ClusterClass builtin-generic-v3.3.0, # kubectl v1.33.1, kubectl-vsphere plugin shipped with vCenter 9.0, VCF CLI 9.0 # Credentials come from the environment, never from the command line history. $ kubectl vsphere login –server=supervisor.lab.local –insecure-skip-tls-verify –vsphere-username "$VSPHERE_USER" Password: Logged in successfully. $ kubectl config use-context ns-payments Switched to context "ns-payments". $ kubectl get ns | grep svc-tkg svc-tkg-domain-c1009 Active 96d $ kubectl get deploy -n svc-tkg-domain-c1009 | grep cap capi-controller-manager 1/1 1 1 96d capi-kubeadm-bootstrap-controller-manager 1/1 1 1 96d capi-kubeadm-control-plane-controller-manager 1/1 1 1 96d capv-controller-manager 1/1 1 1 96d

Write that domain identifier on a sticky note for the length of the session. Every controller log command in this Part needs it, and typing the wrong one returns a clean empty result rather than an error, which is the worst possible outcome when you are under time pressure. A second preflight worth doing once: confirm the Supervisor control plane itself is healthy before blaming a workload cluster. Three control plane virtual machines, a floating IP that answers, and a namespace list that returns promptly are enough. If the Supervisor is degraded, nothing downstream is diagnosable and you are in a different objective.

Numbered diagnostic procedure

1. Prove the namespace can build what you asked for

Three commands, always in this order, always before anything else. A VM class list, a storage class list, and a Kubernetes release list. If any of the three comes back empty or missing the item your manifest names, stop diagnosing and go fix the namespace in vCenter. Nothing downstream will improve.

$ kubectl get virtualmachineclass -n ns-payments NAME CPU MEMORY AGE best-effort-medium 2 8Gi 96d guaranteed-medium 2 8Gi 96d $ kubectl get storageclass NAME PROVISIONER RECLAIMPOLICY AGE vks-default csi.vsphere.vmware.com Delete 96d vks-high-performance csi.vsphere.vmware.com Delete 96d $ kubectl get vkr NAME VERSION READY COMPATIBLE v1.31.4—vmware.1-fips-vkr.1 v1.31.4+vmware.1 True True v1.32.0—vmware.2-fips-vkr.1 v1.32.0+vmware.2 True True # Real failure, induced by removing the storage policy from the namespace: $ kubectl get storageclass No resources found $ kubectl describe pvc data-postgres-0 -n ns-payments | tail -4 Events: Type Reason Age From Message Warning ProvisioningFailed 12m persistentvolume-controller storageclass.storage.k8s.io "vks-high-performance" not found

Note what that failure did not say. It did not mention vCenter, a storage policy, or a namespace. A candidate who has memorised Kubernetes storage will start writing a StorageClass manifest, which on a Supervisor namespace is both futile and unsupported, because storage classes there are projections of assigned vSphere storage policies rather than objects you author.

2. Read the machine chain top to bottom

One command shows you exactly how far the render got. An empty result at any stage tells you which controller stopped and, by extension, which input it was missing.

$ kubectl get vm,machine,vspheremachine -n ns-payments NAME POWERSTATE AGE virtualmachine/vks-app-01-cp-h7k2p poweredOn 22m virtualmachine/vks-app-01-np-a-9dx4l poweredOn 19m NAME CLUSTER PHASE AGE machine/vks-app-01-cp-h7k2p vks-app-01 Running 22m machine/vks-app-01-np-a-9dx4l vks-app-01 Provisioned 19m $ kubectl get cluster,kcp,md -n ns-payments NAME PHASE AGE cluster/vks-app-01 Provisioning 24m NAME INITIALIZED API SERVER AVAILABLE REPLICAS READY kubeadmcontrolplane/vks-app-01-abcde true false 3 1 # Real failure, a malformed manifest applied by hand: $ kubectl get cluster vks-app-01 -n ns-payments -o yaml | grep -A3 message message: ‘error reading current state of the Cluster topology: failed to read VSphereCluster/: failed to retrieve VSphereCluster "" in namespace "ns-payments": VSphereCluster.vmware.infrastructure.cluster.x-k8s.io "" not found’

That empty pair of quotes is the entire diagnosis. An infrastructureRef block was applied with an apiVersion, a kind and a namespace but no name key, so the controller dutifully searched for a VSphereCluster called nothing. Broadcom documents this exact string in knowledge article 416254. Remove or correct the malformed key and reapply. Nobody needs a log for this one, which is the point of reading object status before reading controller output.

3. Interrogate connectivity from both sides of the VIP

When machines exist and nodes never join, the question is whether the control plane endpoint answers, and from where. Check it from the Supervisor context first, because a mismatch between the recorded endpoints and the actual node addresses is an infrastructure fault, while agreement plus a timeout is almost always a stale controller.

$ kubectl describe cluster -n ns-payments vks-app-01 | grep -iA2 endpoint Control Plane Endpoint: Host: 10.20.44.31 Port: 6443 $ kubectl get ep -n ns-payments NAME ENDPOINTS AGE vks-app-01-control-plane 10.20.60.12:6443,10.20.60.13:6443 22m $ kubectl get vm -o wide -n ns-payments | awk ‘{print $1, $4}’ vks-app-01-cp-h7k2p 10.20.60.12 vks-app-01-np-a-9dx4l 10.20.60.21 # Real failure, controller cannot reach a VIP that is genuinely up: $ kubectl describe kcp -n ns-payments vks-app-01-abcde | grep -A4 Message Message: ‘failed to create cluster accessor: error creating http client and mapper for remote cluster "ns-payments/vks-app-01": error getting rest mapping: unable to retrieve the complete list of server APIs: v1: Get "https://10.20.44.31:6443/api/v1?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)’

Two checks separate the two causes. Confirm the cluster is not paused, because a paused cluster produces silence that looks identical to a broken one. Then reach the VIP from a workload cluster control plane virtual machine with a plain curl on 6443. If that succeeds and kubectl against the workload cluster is healthy, the platform is fine and the controller cache is not. Broadcom knowledge article 394554 documents this as a known Cluster API sync fault with a rollout restart as the resolution.

4. Read controller logs, in the correct namespace

$ kubectl logs deployment/capv-controller-manager -n svc-tkg-domain-c1009 -c manager –tail=200 | grep -i ns-payments $ kubectl logs deployment/capi-controller-manager -n svc-tkg-domain-c1009 -c manager –tail=200 # Wrong namespace, and note that it succeeds rather than erroring: $ kubectl logs deployment/capi-controller-manager -n vmware-system-capw -c manager –tail=5 I0812 04:11:02.118433 1 leaderelection.go:250] attempting to acquire leader lease…

Two habits save time here. Controllers run as deployments with leader election, so a replica that is not the leader logs one line about acquiring a lease and then goes quiet; targeting the deployment rather than a pod avoids reading a follower for ten minutes. And grep for your namespace name before you read anything, because a busy Supervisor produces reconcile chatter for every cluster on the estate.

5. Escalate to the control plane virtual machine only when object status is silent

A Supervisor that never reaches Ready, or a workload node that boots and then does nothing, is the one case where you leave the API. Retrieve the Supervisor floating IP and credentials from vCenter, then read the container runtime directly.

# On the vCenter appliance as root $ /usr/lib/vmware-wcp/decryptK8Pwd.py Cluster: domain-c1009 IP: 10.20.44.10 PWD: <redacted> # On a Supervisor control plane VM $ crictl ps -a –name kube-apiserver $ crictl logs 4f1c9a2b7d3e 2>&1 | tail -20 W0225 10:07:07.701754 1 filtered_certs.go:38] Unable to locate interface specified in filter: eth1 W0225 10:07:07.831592 1 logging.go:59] grpc: addrConn.createTransport failed to connect to 127.0.0.1:2379. Err: connection error: dial tcp 127.0.0.1:2379: connect: connection refused # Workload cluster node access, password read from the Supervisor secret $ kubectl get secret vks-app-01-ssh-password -n ns-payments -o jsonpath='{.data.ssh-passwordkey}’ | base64 -d

That eth1 line is worth committing to memory. A Supervisor control plane virtual machine needs two virtual network adapters, eth0 for management and eth1 for the primary workload network. When the agent manager attaches only one, the API server cannot bind to its workload address, etcd never answers, and the Namespaces tab in vCenter sits at Configuring indefinitely. Broadcom knowledge article 430866 is explicit that editing the virtual machine hardware by hand does not fix it and a clean redeployment is required, after confirming both IP pools have at least five free addresses per cluster: three for control plane nodes, one for the VIP, one for upgrade headroom.

Verification, rollback and what green looks like

Verification in this objective means proving each gate rather than trusting a single phase field. Green is four things: every VKr you reference reports READY True and COMPATIBLE True, storage class and VM class lists in the namespace contain the names your manifest uses, KCP reports READY equal to REPLICAS with API SERVER AVAILABLE true, and the Cluster phase reads Provisioned with a control plane endpoint that answers curl on 6443 from a workload node.

# Remediation for the stale controller case, then verification $ kubectl rollout restart deploy -n svc-tkg-domain-c1009 capv-controller-manager $ kubectl rollout restart deploy -n svc-tkg-domain-c1009 capi-controller-manager $ kubectl rollout restart deploy -n svc-tkg-domain-c1009 capi-kubeadm-control-plane-controller-manager $ kubectl get pods -n svc-tkg-domain-c1009 | grep cap capi-controller-manager-6b9f7c4d88-2mq7x 1/1 Running 0 47s capv-controller-manager-7d4c6f9b55-x8kpr 1/1 Running 0 52s $ kubectl get kcp,md -n ns-payments NAME INITIALIZED API SERVER AVAILABLE REPLICAS READY kubeadmcontrolplane/vks-app-01-abcde true true 3 3 NAME REPLICAS READY UPDATED UNAVAILABLE machinedeployment/vks-app-01-np-a 3 3 3 0

Rollback needs honesty. Most steps in this objective are read only and carry no rollback burden at all, which is a good reason to exhaust them before acting. Of the actions that do change state, a controller rollout restart is safe and self healing, since a restarted controller re-reads live state. Deleting a stuck PersistentVolumeClaim to clear drifted quota accounting is not reversible, so capture the claim to a file first and delete it from the layer that created it, workload cluster claims from inside the workload cluster and Supervisor claims from the Supervisor. Unassigning and reassigning a storage policy on a namespace to rebuild the quota custom resources will interrupt provisioning for anything using that policy, so it belongs in a window, not in a triage. And a Supervisor redeploy, which is the documented answer to the single vNIC fault, has no rollback whatsoever, which is why it is the last thing on the list and never the first guess.

Where you start decides what the fault costs you Median minutes to root cause, six induced failures, VCF 9.0 with VKS 3.3.1, same operator, same estate. vSphere Namespace object 9 min Cluster and KCP conditions 14 min Cluster API controller logs 31 min Node virtual machine console 47 min Same six faults, four starting points. Order of reading beat command knowledge every single time.

Symptom to layer lookup

This table is the artifact worth returning to. Every row is an error string I have seen printed on a real estate, matched to the layer that owns it and the action that clears it. Print it, keep it beside your lab, and add rows as you break things.

Error or symptomLayer that owns itRemediation
storageclass.storage.k8s.io "vks-high-performance" not foundNamespace, storage policy not assignedAssign the policy in vCenter, then confirm kubectl get storageclass lists it
kubectl get vm,machine returns no resources, cluster stays ProvisioningNamespace, VM class unbound or VKr not READYAdd the VM class to the namespace, confirm content library sync, re-check kubectl get vkr
VSphereCluster "" not found in namespaceManifest, infrastructureRef missing a name keyCorrect or remove the malformed key and reapply, per knowledge article 416254
failed to create cluster accessor, Client.Timeout against VIP on 6443Controller cache, when the VIP is provably reachableRollout restart capv and capi controllers in svc-tkg-domain-cNN, per article 394554
validate-quota.k8s.io denied the request, insufficient storage quotaNamespace quota accounting drift after a CSI restartClear pending claims, restart storage quota controller and webhook, restart CSI, per article 391096
Unable to locate interface specified in filter: eth1Supervisor control plane VM built with one vNICRedeploy the Supervisor after proving five free IPs per pool, per article 430866
Controller logs look idle and mention only leader lease acquisitionOperator error, wrong namespace or a follower replicaTarget the deployment in svc-tkg-domain-cNN rather than a pod in vmware-system-capw
Scope note: general Kubernetes debugging and NSX packet level analysis are owned elsewhere in the catalogue and get one clause each here. For component mechanics behind these symptoms see the VKS Series, and for segment, VPC and load balancer behaviour see the NSX Series. Readers who arrived from a Pivotal estate should start at the TKGI to VKS Series instead, since the failure vocabulary there is different.

Exam focus, objective 5.1

Objective 5.1, what it actually tests: whether you can map a printed symptom to the layer that owns it, not whether you can recite flags. Expect it as scenario style multiple choice with an error string pasted into the stem, as matching items pairing an error to a component or a namespace, and as point and click or hot area items asking where in vCenter a namespace assignment lives. Multiple selection items tend to ask which two checks you run first, which is a reading order question in disguise. The trap that catches experienced admins is answering vmware-system-capw for the Cluster API logs. Eight years of vSphere with Tanzu material says that, the namespace genuinely still exists on VCF 9.0, and a command against it returns output rather than an error. With VKS delivered as a Supervisor Service the controllers moved to svc-tkg-domain-cNN, and any option offering the old namespace is there to collect people who learned this before VCF 9. Second trap, smaller but common: choosing to author a StorageClass when a Supervisor namespace shows none. Storage classes on a Supervisor namespace are projections of assigned storage policies, so the answer is always a vCenter assignment.

Objective checkpoint

Three original questions, written from the published objective wording:

1. A VKS cluster has been Provisioning for 30 minutes and kubectl get vm,machine in its namespace returns no resources at all. Which check comes first? Answer: the namespace VM class binding and the VKr readiness list. No machine objects means the render never started, and rendering requires a bound VM class and a Kubernetes release reporting READY True, both of which are namespace properties rather than cluster properties.

2. Control plane machines are powered on, kubectl works normally against the workload cluster, yet KCP on the Supervisor reports two nodes Unavailable with a Client.Timeout awaiting headers on the cluster VIP. What is the next action? Answer: rollout restart the Cluster API controllers in svc-tkg-domain-cNN. A healthy workload cluster plus a reachable VIP narrows the fault to a controller that stopped retrying, and only a restart clears that cached state.

3. On a VCF 9.0 Supervisor with VKS installed as a Supervisor Service, which namespace holds the Cluster API logs for workload clusters? Answer: svc-tkg-domain-cNN, where NN is the vCenter cluster domain identifier. The pre Supervisor Service location, vmware-system-capw, still exists and still returns log output, which is precisely why reading it produces confident wrong conclusions.

Diagnostic order I would take into the exam

My own version of the forty minute story is worse, because I had no excuse. A customer cluster refused to scale past two workers on a Thursday afternoon. I opened controller logs in vmware-system-capw, found a leader election line, decided the controller was wedged, and restarted it. Nothing changed, so I restarted it again. Fifty five minutes in, a colleague asked which namespace I was reading. Once I moved to svc-tkg-domain-c1009 the answer appeared in the first twenty lines: the namespace had a VM class quota that permitted exactly two guaranteed-medium machines. Time to fix after that: four minutes, in vCenter, on a screen I had not opened once. Fifty five minutes lost to a namespace name I had typed from memory.

So here is my verdict on how to carry this objective. Popular study advice for troubleshooting objectives is to build a command list and drill it. I think that is the wrong investment, and my own worst hour is the evidence. I knew every command I needed that Thursday. What I lacked was an order and a habit of verifying my assumptions about where things live. Learn the four gate chain instead: namespace inputs, render objects, endpoint reachability, controller state. Learn to derive the domain namespace rather than recall it. Those two things transfer to versions that have not shipped yet, while a memorised namespace name has already expired once.

Tonight, in your own lab, do this. Pick a namespace, remove one storage policy assignment, and try to provision a cluster that references it. Time how long it takes you to get from the first symptom to the vCenter checkbox. Then put the policy back, unbind a VM class, and do it again. Two induced failures, twenty minutes, and you will own the top half of this objective in a way no command list delivers. Next Part stays in Section 5 and goes deeper into the namespace inputs themselves: VM classes, cluster plans, content library and storage and networking faults under objective 5.2.

VCAP-VKS Exam Series · Part 30 of 34
« Previous: Part 29  |  Guide  |  VKS Series  |  Next: Part 31 »

References

About The Author


Discover more from Journal of Intelligent Infrastructure

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure

Subscribe now to keep reading and get access to the full archive.

Continue reading