# kubectl vsphere login ...
<Timestamp> 922913 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
error: You must be logged in to the server (the server has asked for the client to provide credentials)
# kubectl logs -n kube-system kube-apiserver-<tkc>-#####-##### | grep extension | tail -n5
E1002 ##:##:##.00 1 authentication.go:74] "Unable to authenticate the request" err="[invalid bearer token, Post \"https://localhost:5443/tokenreview?timeout=30s\": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"kubernetes-extensions\")]"
# kubectl get cluster -n <namespace> <tkc> -o jsonpath='{.metadata.creationTimestamp}'
<Timestamp of cluster creation>
# kubectl get certificate -n <namespace> <tkc>-auth-svc-cert -o yaml | grep -iE "creationTimestamp|notAfter|notBefore"
creationTimestamp: "<Timestamp for when tkg-controller created the secret>"
notAfter: "<certificate expiration timestamp>"
notBefore: "<Timestamp when cert-manager generated the secret>"
# kubectl get secret -n <namespace> <tkc>-auth-svc-cert -o yaml | grep -i "creationTimestamp"
creationTimestamp: "<Timestamp when secret was created>"Specific observations:vSphere Kubernetes Service 3.5 and earlier
Issue is fixed in vSphere Kubernetes Service 3.6 version. Please refer to the following Release Notes.
Workaround
For a workaround, please reach out to Broadcom Support with reference to this KB article. The workaround involves applying several, possibly invasive steps and hence should only be carried out with or after reaching out to Broadcom Support.