kubectl vsphere login Fails on VCF 9.0.0 and 9.0.1
search cancel

kubectl vsphere login Fails on VCF 9.0.0 and 9.0.1

book

Article ID: 438254

calendar_today

Updated On:

Products

VMware Cloud Foundation VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

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."

Environment

  • VCF 9.0.0
  • VCF 9.0.1

Cause

This issue occurs when the client credentials used by the vCenter Server's OAuth2 client become invalid due to expiration.

Resolution

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.

 KB: vCenter Login Failure with Error "[400] Unable to authenticate. Check your credentials. If problem persists, contact your administrator." in VCF 9.x

To permanently resolve this issue and prevent it from recurring, upgrade vCenter Server to version 9.0.2 or later.