kubernetes / website

Kubernetes website and documentation repo:
https://kubernetes.io
Creative Commons Attribution 4.0 International
4.6k stars 14.49k forks source link

Install and Set Up kubectl on macOS(Apple Silicon) - error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" #43125

Closed suryanadh08 closed 1 year ago

suryanadh08 commented 1 year ago

I have installed latest version of kubectl on macOS(13.4.1). However I'm unable to run any of kubectl commands.

./kubectl version --client Client Version: v1.28.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3

./kubectl get pod -n application error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

k8s-ci-robot commented 1 year ago

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
thisisharrsh commented 1 year ago

/language en /sig auth /kind support

thisisharrsh commented 1 year ago

Hi @suryanadh08, It looks like that kubectl is trying to use a plugin that is not compatible with your current version of the Kubernetes.

thisisharrsh commented 1 year ago

You can try to update all your kubectl plugins to the latest version.

suryanadh08 commented 1 year ago

@thisisharrsh I don't have any plugin installed manually except aws. Kubernetes cluster version is 1.25

aws --version aws-cli/2.0.30 Python/3.7.4 Darwin/22.5.0 botocore/2.0.0dev34

thisisharrsh commented 1 year ago

Kubernetes version 1.25 does not supports the client.authentication.k8s.io/v1alpha1 API version. You can update the kubectl installation to a version that is compatible with version 1.25.

sftim commented 1 year ago

/remove-sig auth

suryanadh08 commented 1 year ago

@thisisharrsh issue is sorted after upgrading aws-cli version from 2.0.x to 2.11.x. Thanks for your support.