Sample of error: 
Unable to connect to the server: getting credentials: decoding stdout: no kind "ExecCredential" is registered for version "client.authentication.k8s.io/v1alpha1 " in scheme "pkg/client/auth/exec/exec.go:62"

 

Preferred check list:

 

-. Need to verify if the communication with the endpoint is normal or not.

-. The version of AWS CLI should be latest.

-. Please check if there's any difference in kubectl version for client and server. this gap can cause this kind of error.

The command of checking each version:

kubectl version --short

-. Please update apiVersion value in User section of .kube/config file to client.authentication.k8s.io/v1beta1
or run "aws eks update-kubeconfig --region region-code --name my-cluster" after updating kubectl version.

 

Reference:

https://github.com/aws/aws-cli/issues/6920
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
https://kubernetes.io/releases/version-skew-policy/
https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
https://stackoverflow.com/questions/73744199/unable-to-connect-to-the-server-getting-credentials-decoding-stdout-no-kind

+ Recent posts