-
-
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
K9s can't connect to cluster in logs but curl to cluster endpoint works #942
Comments
@dgoradia Hum... Can you actually connect to this cluster with kubectl? ie what does |
Yes I can connect to the cluster with kubectl fine. The curl command did actually connect to the cluster and return the data and I think it's the same endpoint used by k9s to test reachability.
|
I started getting that error on OSX after I upgraded to Big Sur. |
I have the exact same issue. I have 4 k3s clusters:
Is it possible to be a latency issue? My Internet connection isn't very fast and that would explain why my local cluster connects fine |
@ferllings Thank you for adding more details here. Every bits helps... Could you attach k9s debug logs so we can track this down? Tx!! |
@derailed it's been intermittent for me and hasn't happened in the last few days so I have been unable to capture the logs yet. As soon as it happens again I will add the logs here. It may have to do with me having a poor connection as times and k9s possibly having a low timeout for a response on the check it does for connectivity, whereas kubectl takes longer to return results but returns then eventually. I'm on macOS Catalina (10.15) and on kubernetes 1.16 (EKS) |
Yes it seems to be intermittent for me as well.
|
I'm seeing this same "issue" against an EKS cluster. kubectl works fine. K9s is timing out. If I set |
I'm also having the same issue right now. |
@adelwin Thank you for pipping in. Which version of k9s are u using. Bumped the default timeout in the last drop. Helped?? |
I think my issue is slightly different from the rest.
|
Hey guys, I had a similar problem and accidentally found a cause and a solution for my case. So, I am using oidc-login to connect to cluster, I also have multiple kubeconfig files for different contexts. The issue was that I had the same username but different credentials (client id/secret) for each context. This is likely to cause unexpected effects, especially when merging kubeconfig. Once I started using a unique username, k9s works perfectly, also combined with kubectx and kubens. Here is a user name field in kubeconfig I am talking about: apiVersion: v1
clusters: ...
contexts: ...
users:
- name: my-user
user: ... |
Hi!
After exit k9s will remember my context but this does not change anything.
My system is macosCatalina 10.15.3. K9s is a great tool, hope this will be fixed :) |
I faced a similar error on my Mac (OS - Big Sur and Monterey) while connecting to AKS from k9s though kubectl worked fine. |
I got the same issue. I tried many versions: it seems to work fine up to version v0.24.11, starting from v0.24.12 it can't connect to my clusters. I am on Ubuntu 20.04, using k8s v1.23.7 and have zero problem with |
For those who might end up here for a similar reason: Similar issue/behavior when running the installation from Snap on Ubuntu 22.04 against GKE (Google), with their
In this scenario both When installing from LinuxBrew ( Running:
|
@RomeroGaliza @Julien-Dosiere hello! Could you please enable debug log level and share your k9s logs? |
I don't know if this helps, but I solved the issue where k9s was not working with minikube, k9s was working with AWS EKS So the issue was I had EKS clusters already configured and was loading the KUBECONFIGs using the command below in .zshrc
|
The issue I'm having is from my weird WSL setup. I got the logs as per #942 (comment) Read them with
I thought maybe installing
I can connect to my Docker Desktop fine through k9s, it's just my prod cluster on DigitalOcean I can't connect to. |
After upgrading k9s (
I was getting both I have fixed them (on macOS) by using v1beta1 instead:
|
I have the same problem as @jccmelo and downgrading k9s via brew is not a trivial task at all. However, unlike for him, changing v1alpha1 to v1beta1 did not help. |
@kurtextrem please share your versions (k9s, kubectl, cluster, etc) |
In my case it was an outdated |
My problem was same with @kurtextrem. This is k9s log
It seems that the new version doesn't allow apiVersion v1alpha1. So I changed its apiVersion in the kubeconfig to v1beta1, but it still doesn't work. |
I just had a similar problem where setting KUBECONFIG to multiple kubeconfig paths and kubectl worked, but k9s didn't work for all but one. turns out I had a collision with the user name in my configs and the error from the k9s logs weren't obvious that it was an auth failure. fixing that collision fixed my issue. |
For those who are experiencing this problem with Google GKE clusters after updating to use the gke-gcloud-auth-plugin, I found the solution to the problem. It looks like the kube config information has to change for k9s to be able to connect to the contexts properly. For some reason kubectl works just fine but k9s couldn't talk to the cluster. This is the change I made and my context was able to work again - edit (on Mac) ~/.kube/config
As you can see above, the new gke-gcloud-auth-plugin approach is much more generic than it used to be. If you have multiple contexts you should be able to just copy and paste the This got my k9s back into a good state for me. |
Same issue "can't connect" to GKE clusters. New install on M1 Mac (13.2.1). k9s 0.27.3. kubectl commands work OK. I have 2 Linux machines that connect with no problem.
This MBP is my "corporate" Mac and has the Zscaler security tool installed. It's basically a MITM that inspects SSL traffic and is known to cause issues with cert's, etc. I did try connecting with the "insecure-tls" option but it didn't make a difference. My Linux machines do not have Zscaler installed. 4:44PM INF 🐶 K9s starting up... |
The above issue is specific to one GKE cluster. I can connect to other clusters from my Mac without issues. |
I had the same problem. In my case, I use multiple kubeconf files. My mistake was that I use the same user in kubeconf files: users:
Therefore k9s can't use the correct cert to connect to cluster. |
Looks like this issue stemmed from k8s lib update and the vendor auth changed. I think this is a dup of #1619. |
Describe the bug
When opening up k9s to connect to a cluster, it fails with
Boom!! K9s can't connect to cluster
.Logs show that a GET request to the cluster version endpoint timed out:
To make sure my machine is able to obtain connectivity with that endpoint:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Connect to cluster and k9s opens
Screenshots
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: