k9s
k9s copied to clipboard
Allow k9s to start without requiring a valid Kubernetes context
For users managing multiple Kubernetes clusters, the current behavior of k9s creates friction:
- You have to remember to run
kubectl config use-context <cluster>before starting k9s - If you have a work cluster set as current context but start k9s at home (without VPN), k9s hangs for minutes trying to connect before failing
- When the configured context is unreachable, k9s exits with errors instead of allowing you to select a different context
# At home
kubectl config use-context homelab
k9s
# At work (or home after connecting to VPN)
kubectl config use-context work-cluster
k9s
# Back at home
kubectl config use-context homelab # If you forget this, k9s will hang trying to connect to work cluster
k9s
Proposed Solution
- If no context is set, show the context view immediately
- Let users select the appropriate context from within k9s
- Eliminate the manual
kubectl config use-contextstep
PR https://github.com/derailed/k9s/pull/3704