Symptoms:
Name - Kind - Type - Message - Reason - Component <>-control-plane-<> - VirtualMachine - Warning - GET https://<>:443/rest/vcenter/cluster/modules/vm/<>/members: 401 Unauthorized - UpdateFailure - vmware-system-vmop/vmware-system-vmop-controller-manager-<>/virtualmachine-controller
YYYY-MM-DDTHH:MM:SS.#######Z stderr F E1018 ##:##:21.688666 1 contentsource_controller.go:297] controllers/ContentSource "msg"="error listing images from provider" "error"="get library items failed for: GET https://<>:443/rest/com/vmware/content/library/item?library_id=<>: 401 Unauthorized" "clProviderName"="<>" "clProviderUUID"="<>"
YYYY-MM-DDTHH:MM:SS.#######Z stderr F E1018 ##:##:21.688692 1 contentsource_controller.go:328] controllers/ContentSource "msg"="Error listing VirtualMachineImages from the content provider" "error"="get library items failed for: GET https://<>:443/rest/com/vmware/content/library/item?library_id=<>: 401 Unauthorized" "contentSourceName"="<>"
YYYY-MM-DDTHH:MM:SS.#######Z stderr F E1018 ##:##:21.688722 1 contentsource_controller.go:343] controllers/ContentSource "msg"="failed to difference images" "error"="get library items failed for: GET https://<>:443/rest/com/vmware/content/library/item?library_id=<>: 401 Unauthorized"
The "401 Unauthorized" errors in vmop-controller-manager suggest an authentication failure with the Supervisor cluster.
This authentication is necessary for vmop-controller-manager to monitor the TKC clusters and ensure they align with their desired state.
Validate if the credentials are in sync,
SSH to Supervisor control Plan node from vCenter.
root@vcenter [ ~ ]# /usr/lib/vmware-wcp/decryptK8Pwd.pyCluster: domain-c8:###################IP: <Ip address>PWD: ###########
Execute the following command on the Supervisor Control Plane node to obtain the username and password:
kubectl get secret -n vmware-system-vmop wcp-vmop-sa-vc-auth -oyaml -ojsonpath='{.data.username}' |base64 -d; echo
kubectl get secret -n vmware-system-vmop wcp-vmop-sa-vc-auth -oyaml -ojsonpath='{.data.password}' |base64 -d; echo
Example:
root@######################## [ ~ ]# kubectl get secret -n vmware-system-vmop wcp-vmop-sa-vc-auth -oyaml -ojsonpath='{.data.username}' |base64 -d; echo
wcp-vmop-user-domain-c8-########-####-####-####-##########@vsphere.local
root@######################## [ ~ ]# kubectl get secret -n vmware-system-vmop wcp-vmop-sa-vc-auth -oyaml -ojsonpath='{.data.password}' |base64 -d; echo
################
service-control --restart wcp
root@################### [ ~ ]# kubectl get secret -n vmware-system-vmop wcp-vmop-sa-vc-auth -oyaml -ojsonpath='{.data.password}' |base64 -d; echo