Skip to content

Context Switch unreliable/not working #2446

@mj-jackson

Description

@mj-jackson




Describe the bug
After upgrading to 0.30.x / 0.31.x switching contexts via :ctx is very unreliable. Sometimes it works, but most often it will get stuck. Autorefresh is no longer working and the only option available is to quit, set context manually via kubectl and start k9s again.

I am working on macOS, cannot test if other OSs are affected as well.

To Reproduce
Steps to reproduce the behavior:

  1. Install k9s
  2. configure multiple contexts
  3. Set a specific context
  4. use :ctx to show configured contexts
  5. choose a different one
  6. use :pods to show pods
  7. pod-view will not autorefresh anymore (and most of the time will show the old context)

Expected behavior
In versions 0.2x.x while selecting a different context put you back to the last view used, meaning: Navigating from :pods to :ctx, selecting a context would select the context and automatically set you back to :pods. This is the expected behavior.

Versions (please complete the following information):

  • OS: macOS 14.2
  • K9s: 0.30.x & 0.31.x
  • K8s: 1.25.16

Additional context
When selecting the new context, the marker (*) does not update in the info area at the top. Other information, eg. Context, Cluster, is updated, but "CPU" and "MEM" freezes at current value or falls to 0% and does not update anymore.
I install via homebrew, deleting the config folder /Users/my_user/Library/Application Support/k9s completely and reinstalling did not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions