Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to K8s cluster due to mismatch in client authentication api version #37

Closed
jimvmathews opened this issue Sep 23, 2022 · 9 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@jimvmathews
Copy link

Unable to connect to K8s cluster due to mismatch in client authentication api version

Error:
Error: Kubernetes cluster unreachable: Get "https://5a51c73d67a28d21c8038197f2d67054.sk1.us-west-1.eks.amazonaws.com/version": getting credentials: exec plugin is configured to use API version client.authentication.k8s.io/v1beta1, plugin returned version client.authentication.k8s.io/v1alpha1

@koslib
Copy link
Owner

koslib commented Sep 23, 2022

Hello @jimvmathews, thanks for reporting! What's your cluster version?

@koslib koslib added the bug Something isn't working label Sep 23, 2022
@koslib
Copy link
Owner

koslib commented Oct 16, 2022

Hey @jimvmathews, you can give it another shot now. I've updated the awscli and kubectl versions - could you let me know if it feels better now? Thanks!

@brunoflegler
Copy link

Good morning @koslib, I had the same problem now, do I need to change something first?

@koslib
Copy link
Owner

koslib commented Oct 17, 2022

Hey @brunoflegler what's your cluster version? The only think I can imagine is kubectl being on a version not compatible with your cluster version, so let's start from there and we can gradually drill down to it.

@brunoflegler
Copy link

Hey @koslib, my cluster is at version 1.21.

@koslib
Copy link
Owner

koslib commented Oct 17, 2022

@brunoflegler can you try with action version v1.25.2 and let me know if it worked? It feels like the kubectl version upgrade that happened in v1.25.3 and onwards is what's blocking you folks.

- uses: koslib/helm-eks-action:v1.25.2
....

@brunoflegler
Copy link

Hi @koslib , I did the test yesterday and yes it works fixing the mentioned version.

roc added a commit to nhsx/standards-registry that referenced this issue Oct 19, 2022
See koslib/helm-eks-action#37 (comment) for more

* We're using the master version of the helm github action
* It recently had an update that featured a kubectl version update
* This has had the knock on effect of causing our helm deploys to fail with

```
invalid apiVersion "client.authentication.k8s.io/v1alpha1"
```
roc added a commit to nhsx/standards-registry that referenced this issue Oct 19, 2022
See koslib/helm-eks-action#37 (comment) for more

* We're using the master version of the helm github action
* It recently had an update that featured a kubectl version update
* This has had the knock on effect of causing our helm deploys to fail with

```
invalid apiVersion "client.authentication.k8s.io/v1alpha1"
```
@koslib
Copy link
Owner

koslib commented Oct 19, 2022

Thanks @brunoflegler for getting back to me on that! To be honest I don't see any other option other than sticking with version v1.25.2 which is the last to support your k8s version.

How do you recommend this is handled? Because the action needs to be updated with fresh dependency versions, however I understand that some users might need to use older versions still. Would it make sense potentially to have branches based on k8s versions as well as relevant tagging? Any other ideas?

At least I'm glad this is no longer an ongoing issue for you, even with this workaround stuff is working on your end:)

@koslib koslib added the duplicate This issue or pull request already exists label Oct 22, 2022
@koslib
Copy link
Owner

koslib commented Oct 22, 2022

Seems to be duplicate of #41 - closing this one and continuing discussion there

@koslib koslib closed this as completed Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants