# How do I diagnose VKS Kubernetes API login, TLS, and permission errors?

Exam: 3V0-24.25 — Advanced VMware Cloud Foundation 9.0 vSphere Kubernetes Service
Knowledge domain: Troubleshoot and optimize the VMware Solution
Updated: 2026-11-25T06:11:29.909782+00:00
HTML: https://learningpathx.com/faq/3V0-24.25/vcap2425-vks-api-access-troubleshooting.html

## Also asked as

- How can I tell whether VKS API access failed because of trust, credentials, or RBAC?
- Where should I look when kubectl cannot authenticate or returns Forbidden in VKS?

Start by checking the API endpoint and kubeconfig context for the exact command that failed. On VCF 9 use the supported VCF CLI access workflow, then check whether the request is reaching the Supervisor or the intended VKS workload cluster. Those targets have different permissions.

* **Certificate or hostname error:** verify DNS, the endpoint's hostname and certificate chain, and the trust configured for that client. Add a verified issuing CA through the supported procedure when required.
* **Unauthorized (HTTP 401):** verify the credential or identity flow, expiry and intended API. Reauthenticate with the supported method as needed.
* **Forbidden (HTTP 403):** read the user or subject, resource, verb and scope from the error. Use `kubectl auth can-i <verb> <resource> -n <namespace>` for a namespaced action in that context. For a cluster-scoped action, omit the namespace. Check Supervisor namespace permissions or workload-cluster RBAC according to the endpoint that returned the denial. If the error reports a failed admission policy or quota, follow the named admission control.

Use `kubectl config current-context` and `kubectl config get-contexts` with the same kubeconfig as the failed command. A namespace permission may let you query resources in the assigned Supervisor namespace while a cluster-wide query there still fails. Retest the original verb and scope with the affected identity after correcting the mismatch.

Official references

* [Planned Activity Precheck Review Case for VKS/Workload Cluster](https://knowledge.broadcom.com/external/article?articleNumber=404620)
* [Troubleshooting Kubectl vSphere Contexts](https://knowledge.broadcom.com/external/article/435399/troubleshooting-kubectl-vsphere-contexts.html)
* [vSphere Namespace Permissions for VKS](https://knowledge.broadcom.com/external/article/424897/vsphere-namespace-permissions-for-vks.html)
* [Authenticating | Kubernetes](https://kubernetes.io/docs/reference/access-authn-authz/authentication/)
* [Authorization | Kubernetes](https://kubernetes.io/docs/reference/access-authn-authz/authorization/)
* [kubectl auth can-i | Kubernetes](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_can-i/)

Source: [Designing VKS Identity, RBAC, Certificates, and Registry Access](https://learningpathx.com/news/designing-vks-identity-rbac-certificates-and-registry-access.html)
