When attempting to log in via the CLI, the kubectl vsphere login command fails with the following output:
$ kubectl vsphere login --server xxx.xx.xx.xx --insecure-skip-tls-verify --vsphere-username <USER>@<DOMAIN> --tanzu-kubernetes-cluster-namespace <VSPHERE_NAMESPACE> --tanzu-kubernetes-cluster-name <CLUSTER>
Password:
FATA[YYYY-MM-DD hh:mm:ss.ss] Error while getting list of workloads: invalid or missing credentials
Similarly, attempts to log in to the vCenter Server using Single Sign-On (SSO) also fail with the following error:
"[400] Unable to authenticate. Check your credentials. If the problem persists, contact your administrator."
This issue occurs when the client credentials used by the vCenter Server's OAuth2 client become invalid due to expiration.
If you are experiencing this issue on VCF 9.0.0 or 9.0.1, apply the workaround provided in the Broadcom Knowledge Base article linked below.
To permanently resolve this issue and prevent it from recurring, upgrade vCenter Server to version 9.0.2 or later.