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

invalid apiVersion "client.authentication.k8s.io/v1beta1" #3

Closed
haysclark opened this issue Jun 13, 2019 · 3 comments
Closed

invalid apiVersion "client.authentication.k8s.io/v1beta1" #3

haysclark opened this issue Jun 13, 2019 · 3 comments

Comments

@haysclark
Copy link

haysclark commented Jun 13, 2019

Got this error when following the example and trying the second step:

2. Check that your cluster is available: kubectl --context do-nyc1-example get nodes

Output with error message:

☹  kubectl --context do-nyc1-example get nodes
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1beta1"

Repo notes:
doctl version: 1.20.0-release

kubectl version:

Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1beta1"
@haysclark
Copy link
Author

haysclark commented Jun 13, 2019

Fixed, it was an issue with my local OSX setup.

TL;DR

I had installed kubectl with Homebrew via: brew install kubectl and I should have used brew install kubernetes-cli per kubernetes.io docs. Thus, my local setup was not able query the Server Version.

Now all is well when I run step 2, and this is my kubectl version output:

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-07T09:57:54Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

@cheemcheem
Copy link

Just to add to this, I experienced this issue and it was because I had an old installation of Docker Desktop on OSX and its installation had set up this symlink:
/usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl

To fix the issue, I opened Docker Desktop and it prompted me to update which I did. I'm now on version 2.5.1.4 (49550) and the issue has gone away.

@gaffneyd4
Copy link

For anyone else who goes looking for this message, I ran into it due to the latest version of aws-iam-authenticator (0.5.5) requiring client.authentication.k8s.io/v1beta1 in the user exec kubeconfig block.

kubernetes-sigs/aws-iam-authenticator#386 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants