4 Answers
- Newest
- Most votes
- Most comments
0
Let's tackle your issue step by step to find a solution:
- Check that your kubectl client version is compatible with the EKS cluster's Kubernetes version. AWS EKS typically supports kubectl versions that are +/- 1 minor version from the cluster's version.
- Update AWS CLI using pip install
awscli --upgrade --user
. - Update eksctl by following instructions on its AWS documentation.
- The error about invalid apiVersion "client.authentication.k8s.io/v1alpha1" suggests an issue with the authentication API version. Since manually changing to v1beta1 didn't help, ensure any plugins or the AWS CLI/SDK managing kubeconfig are up to date.
- Regenerate your kubeconfig file with
aws eks update-kubeconfig --region eu-central-1 --name cluster07
. - Verify any external plugins, like AWS IAM authenticator, are updated. Check for kubectl plugins that might affect authentication.
- Debug authentication issues with
kubectl get nodes --v=9
for detailed error messages.
0
As a troubleshooting step, consider removing the existing kubeconfig for your cluster and regenerate it using the aws eks update-kubeconfig command. Sometimes, starting fresh can resolve unexpected issues.
- done it before, didn't help
answered 6 months ago
0
Hello Edwards the issue seems to be because of awscli version.
As I can see you are still using awscli v1, Please migrate to awscli v2 following the documentation https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-instructions.html and then run update kubeconfig command again aws eks update-kubeconfig --region eu-central-1 --name cluster07.
The above shall resolve the issue.
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 days ago
1 - kubectl version --client Client Version: v1.29.3 2 - aws-cli/1.22.34 Python/3.10.4 Linux/5.15.0-50-generic botocore/1.23.34 3- eksctl version 0.175.0 4 - done before 5 - aws-cli/1.22.34 Python/3.10.4 Linux/5.15.0-50-generic botocore/1.23.34 6 - done before 7 - no any plugins 8 kubectl get nodes --v=9 I0326 21:37:33.723394 18440 loader.go:395] Config loaded from file: /root/.kube/config I0326 21:37:33.724601 18440 round_trippers.go:466] curl -v -XGET -H "Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json" -H "User-Agent: kubectl/v1.29.3 (linux/amd64) kubernetes/6813625" 'https://BA23B0A2CEE451D920C4119B0077F99B.gr7.eu-central-1.eks.amazonaws.com/api?timeout=32s' I0326 21:37:34.229504 18440 round_trippers.go:553] GET https://BA23B0A2CEE451D920C4119B0077F99B.gr7.eu-central-1.eks.amazonaws.com/api?timeout=32s in 504 milliseconds I0326 21:37:34.229579 18440 round_trippers.go:570] HTTP Statistics: DNSLookup 0 ms Dial 0 ms TLSHandshake 0 ms Duration 504 ms I0326 21:37:34.229708 18440 round_trippers.go:577] Response Headers: E0326 21:37:34.230222 18440 memcache.go:265] couldn't get current server API group list: Get "https://BA23B0A2CEE451D920C4119B0077F99B.gr7.eu-central-1.eks.amazonaws.com/api?timeout=32s": 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" I0326 21:37:34.230510 18440 cache
1 more thing - here is conf file server: https://BA23B0A2CEE451D920C4119B0077F99B.gr7.eu-central-1.eks.amazonaws.com name: cluster07.eu-central-1.eksctl.io contexts:
but i still have message about 1alpha1 in logs, may be i have to change it somewhere?
As a troubleshooting step, consider removing the existing kubeconfig for your cluster and regenerate it using the aws eks update-kubeconfig command. Sometimes, starting fresh can resolve unexpected issues.