kubernetes

How do I switch between contexts in K9s when the contexts have already been set up?


I have few contexts setup in K9s. How do I switch between them?

For example, I am in the PROD context, and I want change the context to NONPROD.

How do I do this using the shortcuts?


Solution

  • You can switch to another context by typing :ctx <context-name>. For example:

    # Switch to the PROD context
    :ctx PROD
    
    # Switch to the NONPROD context
    :ctx NONPROD
    

    A full list of commands and keybindings are available here.