Error: Invalid Credentials, lacking read permissions, or server not found.
This article provides some troubleshooting tips to try if your Kubernetes resource fails the healthcheck, and you get the “Error: Invalid Credentials, lacking read permissions, or server not found” message.
First check the permissions in the specified namespace to allow the following commands required for the healthcheck to pass.
kubectl get namespaces
kubectl describe namespaces strongdm
kubectl get deployments -n strongdm
kubectl get pods -n strongdm
If your resource is authenticating with a Kubernetes service account, you can check that the service account has permissions with something similar to the following:
kubectl auth can-i get namespaces --as=system:serviceaccount:<NAMESPACE>:<SERVICE_ACCOUNT> -n <NAMESPACE>
If you have Kubernetes native logging enabled, check the API and/or audit logs for the cluster, as these logs could provide additional information about permissions-related errors. If these logs are not already enabled, please enable them, run a healthcheck for the resource, and then check the logs for related errors.