How to fix kubectl exec plugin invalid apiVersion client.authentication.k8s.io/v1alpha1
in case you are getting this error after updating kubectl
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
Double check the current version
kubectl version
if you are at Major:1 and Minor: 24, then you probably need to downgrade to 1.23.6
How to do that on Apple Silicon /M1
cd /tmp
sudo rm -f /usr/local/bin/kubectl
curl -LO "https://dl.k8s.io/release/v1.23.6/bin/darwin/arm64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo chown root: /usr/local/bin/kubectl
kubectl version
Full instructions here