API Server Authentication to AWS EKS (client.authentication.k8s.io/v1alpha1)

0

Error: Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1\

EKS v1.23.10; kubectl 1.19.6; HELM 3.10.0; Maven 3.8.1; Jenkins 2.361; RHEL 8.6 While I try to connect to EKS from Jenkins server, the authentication error is displayed. What kind of authentication required and how to apply?

3개 답변
0

Hello rkothama,

This issue occurs if you have updated your "kubeconfig" on your server using aws eks update-kubeconfig command using the older version of the AWS CLI.

Resolution: Please upgrade your AWS CLI on your Jenkins server to the latest version by following this doc and re-run the aws eks update-kubeconfig command to re-update your "kubeconfig" on your Jenkins server to fix this issue.

Please comment on this answer if you are still facing issues. Thank you!

profile pictureAWS
지원 엔지니어
답변함 2년 전
  • Well, on Jenkins Server, I did copy the kubeconfig contents from EKS server. I did not install aws cli. If it is required, I will install aws cli and check. I would appreciate you confirming for me.

  • Thanks for the reply!

    Yes, you can perform the steps that I mentioned earlier or you can also do the below steps (manual approach):

    Open the "~/.kube/config" file on your Jenkins server and check the "apiVersion" specified for your cluster. I believe it would be client.authentication.k8s.io/v1alpha1.

    Replace it with client.authentication.k8s.io/v1beta1 and your authentication should work.

    Thank you!

0

Hi Venkat, I tried to replace "v1alpha1" with "v1beta1" on Jenkins Server. However, it still says the following. Do I need to replace on EKS Cluster too? or install credential plugins. Does that sounds like required?

"Kubernetes cluster unreachable: Get "https://85D6BF0D2245D33BB97D2115ED77*****.gr7.us-west-2.eks.amazonaws.com/version": getting credentials: exec: executable aws-iam-authenticator not found". It looks like you are trying to use a client-go credential plugin that is not installed.

답변함 2년 전
  • I think you could install the latest AWS CLI version and run the aws eks update-kubeconfig --name <cluster-name> command to fix this problem. The error you posted could be due to an outdated config file on your server. Running the update-kubeconfig command should fix this problem.

    Have you already tried doing that?

0

Venkat, thank you so much. I could deploy helm package onto AWS EKS Cluster from Jenkins on EC2 instance. Here is the output on EKS Cluster:

kubectl get pods

NAME READY STATUS RESTARTS AGE mysqldatabase-5dbf57c478-gs7rq 0/1 Pending 0 7m23s

답변함 2년 전
  • That's great. Please accept my original answer as it might help others facing the same problem. Thank you!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠