An administrator is upgrading to VKS 3.4 and encounters the following error during cluster creation using workload, yami:
Error from server (Forbidden): error when creating "workload.yaml": admission webhook
"capi.mutating.tanzukubernetescluster.run.tanzu.vmware.com" denied the request: Cluster and variable validation failed:
[spec.topology.variables[defaultStorageClass]: Invalid value: "\"vks-storage-policy\"": variable is not defined,
spec.topology.variables[nodePoolVolumes]: Invalid value: "[{\"capacity\":{\"storage\":\"100Gi\"},\"mountPath\":\"/var/lib/containerd\",\"name\":\"containerd\",\"storageClass\":\"vks-storage-policy\"},{\"capacity\":{\"storage\":\"100Gi\"},\"mountPath\":\"/var/lib/kubelet\",\"name\":\"kubelet\",\"storageClass\":\"vks-storage-policy\"}]": variable is not defined,
spec.topology.variables[trust]: Invalid value: "{\"additionalTrustedCAs\":[{\"name\":\"additional-ca-1\"}]}": variable is not defined]
How should the administrator resolve this issue to successfully complete the upgrade " ?
Show answer and explanation
Correct answer: B
The error shows an admission webhook denial wherevariable validation failedand multiple entries under spec. topology.variables[...] are reported as"variable is not defined". That message indicates the manifest is supplying variables that arenot part of the current Cluster API / topology schemaenforced by the Supervisor during cluster creation. In VKS, cluster provisioning isdeclarative: you invoke the VKS API withkubectl + a YAML file, and "after the cluster is created, you update the YAML to update the cluster." When the API /schema changes between releases, older manifests can contain fields/variables that are no longer recognized, and the admission webhook blocks them to prevent creating an invalid cluster spec.
This aligns with VMware's broader direction that the olderTanzuKubernetesCluster (TKC) API was deprecatedand customers are encouraged to useCluster APIfor bootstrap/config/lifecycle management. In practice, to complete the upgrade/creation successfully, you must update the cluster manifest to match the supported schema:remove the deprecated/unknown topology variablesshown in the error (for example, the undefined storage-policy and trust variables) and re-apply the correctedworkload.yaml.

