After the Supervisor is upgraded, a Supervisor Service is failing to come up even though it was healthy in the previous Supervisor version.
The following symptoms are observed:
kubectl get pkgi -n vmware-system-supervisor-services <packageinstall-name>
kubectl get app -n vmware-system-supervisor-services <packageinstall-name> -o yaml
Error: Deployment has encountered replica failure: FailedCreate, message: admission webhook "validate.cpvmpod.appplatform.vmware.com" denied the request: running pod <supervisor-service-namespace>/<pod-name> in an untrusted namespace on the control plane VM is not allowed
kubectl get ns <supervisor-service-namespace> --show-labelsThe supervisor service namespace (<supervisor-service-namespace>) is missing the labels managedBy=vSphere-AppPlatform and appplatform.vmware.com/serviceId=<service-id>.
The admission webhook validate.cpvmpod.appplatform.vmware.com only lets a pod run on the Supervisor control plane VMs if its namespace carries both labels. Without them, the webhook treats the namespace as untrusted and rejects every new service pod. This happens whenever the pods are recreated, for example during a Supervisor upgrade or a service version upgrade.
/usr/lib/vmware-wcp/decryptK8Pwd.pyexport KUBECONFIG=/etc/kubernetes/admin.confkubectl get ns | grep svc-<service-name>kubectl get pkgi -n vmware-system-supervisor-services <packageinstall-name> -o jsonpath='{.metadata.labels.appplatform\.vmware\.com/serviceId}{"\n"}'kubectl label ns <supervisor-service-namespace> managedBy=vSphere-AppPlatform appplatform.vmware.com/serviceId=<service-id>kubectl get pods -n <supervisor-service-namespace>kubectl get pkgi -n vmware-system-supervisor-services <packageinstall-name>