derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
27.21k stars 1.7k forks source link

K9s stuck in context section #1741

Closed Tusamarco closed 2 years ago

Tusamarco commented 2 years ago




Describe the bug On linux centos 7.2 (64bit)
after update from 0.24 to 0.26.3 running k9s I get stuck in the context section and no other command is accepted. I roll back to previous version but nothing at this point always stuck there. Wondering where (aside ~/.config/k9s) k9s store any state that could justify this behavior. Also searched with find for k9s but if the temporary state files are named in a different way is useless

To Reproduce Steps to reproduce the behavior: Unfortunately I am not sure how this can be reproduced Expected behavior K9s working ;)

Screenshots

Versions (please complete the following information):

k9s version
 ____  __.________       
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \ 
|____|__ \ /____//____  >
        \/            \/ 
Version:    v0.26.3
Commit:     7f9f3ce
Date:       2022-09-01T15:10:39Z

Additional context Add any other context about the problem here.

Tusamarco commented 2 years ago

k9s_issue

Tusamarco commented 2 years ago

Also some log entries:

6:27PM INF 🐶 K9s starting up...
6:27PM WRN Unable to dial discovery API error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""
6:27PM ERR Fail to locate metrics-server error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""
6:27PM ERR failed to connect to cluster error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""
6:27PM WRN No context specific skin file found -- /home/tusa/.config/k9s/mt_admin@mt-test-cluster1.eu-central-1.eksctl.io_skin.yml
6:27PM WRN No skin file found -- /home/tusa/.config/k9s/skin.yml. Loading stock skins.
6:27PM ERR Load cluster resources - No API server connection
6:27PM WRN Custom view load failed /home/tusa/.config/k9s/views.yml error="open /home/tusa/.config/k9s/views.yml: no such file or directory"
6:27PM WRN CustomView watcher failed error="no such file or directory"
6:27PM ERR Unable to connect to api server error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""
6:27PM ERR Cluster updater failed! error="Conn check failed (1/5)"

To note I can see all fine with kubectl

Tusamarco commented 2 years ago

forget it fixed: aws eks update-kubeconfig --name mycluster But would be nice to have some messaging in the scree indicating the issue in connection

slimus commented 2 years ago

@Tusamarco hello! This message from k8s library, I'm not sure we can handle it... I'll check the code. Thanks!

mateothegreat commented 2 years ago

When running k9s and viewing your log file (find it with k9s info) you'll see:

9:41PM ERR Unable to connect to api server error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""

You more than likely have an older version of the aws cli that sets client.authentication.k8s.io/v1alpha1 in ~/.kube/config when you run aws eks update-kubeconfig ...

Change from v1alpha1 to v1beta1 in your ~/.kube/config:

sed -i .backup -e 's/v1alpha1/v1beta1/g' ~/.kube/config

Upgrade your aws cli to prevent this from re-occurring.

onemargaro commented 2 years ago

When running k9s and viewing your log file (find it with k9s info) you'll see:

9:41PM ERR Unable to connect to api server error="exec plugin: invalid apiVersion \"client.authentication.k8s.io/v1alpha1\""

You more than likely have an older version of the aws cli that sets client.authentication.k8s.io/v1alpha1 in ~/.kube/config when you run aws eks update-kubeconfig ...

Change from v1alpha1 to v1beta1 in your ~/.kube/config:

sed -i .backup -e 's/v1alpha1/v1beta1/g' ~/.kube/config

Upgrade your aws cli to prevent this from re-occurring.

Thanks this works for me.