Study FAQ
How do I diagnose VKS Kubernetes API login, TLS, and permission errors?
Also asked as 2
- 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?
Answer
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
Full explanation
Designing VKS Identity, RBAC, Certificates, and Registry Access
Study guide · 3V0-24.25
Read the full explanation