-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 context #1619
Comments
I have same issue, check
while connecting to EKS. Note that EKS does not (and will not) support alpha APIs so any k8s client app (like k9s) built with recent I'm reverting back to v0.25.18 that works fine. |
Same here 😢 (also EKS) |
For me is EKS too. I'll leave my log file:
|
Hi there! Have you tried to update k8s config like this https://stackoverflow.com/questions/72126048/circleci-message-error-exec-plugin-invalid-apiversion-client-authentication ? |
@carlosleoliveira Rats!! Thank you all for weighting in on this ding dang deal! In the latest k9s drop I've updated k8s deps to the latest 1.24.2. After further investigation, it looks like the latest k8s client indeed breaks eks ;( @mouchar Thank you for the pointer!!) I don't have access to an eks cluster at the moment. Much appreciated if anyone can take this for a spin on eks and report back! If still a dud, I'll revert to an older k8s rev. Thank you!! |
@slimus @derailed thanks for the reply. The fix was to change the config file to v1beta1. The |
@carlosleoliveira Cool! Thank you for reporting back!! K9s gets its metrics from the metrics-server which must be present on your cluster. |
@derailed nice! thanks for the help! |
I modified my configs to use: Thanks for the solution! |
hello, just pointing that after the documentation https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ the client/sever compatibility is guaranteed only with one minor difference.
So imho attempts to make a 1.24 cli works on a 1.21 is a hack that can lead to unexpected behaviours, not a bugfix. |
hey @mouchar, how did you reverted the k9s version? I have tried to run something like |
Same problem for me after updating to version 0.25.19 |
@roma-glushko |
same issue here with 0.25.19 and above, luckily rollback works: |
Leaving a note if someone else is banging the head against the wall after changing |
Out of interest what version of k8s(kubectl) are you running? |
client kubectl v1.21.5 and cluster v1.22.9-eks
|
updating aws cli to 2.7.x and rerunning
|
In my case it was due to GKE auth plugin issue. Just update plugin https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke |
This solution worked for me. I had this error ´´Unable to connect to api server error="exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1""´´ |
Same issue happened to me for "Unable to connect context" with 'Unable to connect to api server error="exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1""' error. Updating aws-cli binary version under /usr/local/bin to "aws-cli/2.11.20" and "export PATH=/usr/local/bin" solved the issue. One may double confirm the kubeconfig under ~/.kube/config for the target cluster context's api version |
Hello, I am on aws-cli/2.13.19 and I'm receiving similar error in k9s. Using aws eks-update-kubeconfig wasn't working for me and I found issue #1619 through google searching. Glancing at the posts from this year, it seems the issue has resurfaced. Thank you @derailed and @ikersuen I edited ~/.kube/config and changed the apiVersion from v1alpha1 to v1beta1 on the clusters I need to work with and now k9s is working. |
reading from above comments, I understand that I need to change aws-cli: |
Describe the bug
After I updated to version 0.25.19 when I open k9s can't get into any context. Get the 'unable to connect to context' after a while get the toast message.
To Reproduce
Steps to reproduce the behavior:
brew update k9s or brew install k9s
scoop install k9s
Expected behavior
View my pods, deployments, etc
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: