K9s¶
K9s is a terminal interface which will help get a dynamic view of a cluster.
Install is straightforward, it’s a single binary, and it connect to the current context by default
Install¶
Usage¶
Here are some of the basic command line options to start k9s
:
-
k9s -n <namespace>
: start k9s within a specific namespace -
k9s --context <context>
: start k9s using another context than the selected one -
k9s --readonly
: start k9s in read-only mode, to ensure you won't change any running resource
As k9s
is a terminal console application, there's no mouse support or buttons to click. Here is a list of the most used commands you can use:
/<filter>
: to filter the list of resources, ex: /core to list only coredns pods<ESC>
: to stop any command or clear filters0
: to list pods from ALL namespacesd
: (on a resource): describe the resourcee
: (on a resource): edit the resource (:q to quit, like in VI, depends on your EDITOR variable I guess)l
: (on a resource): show logs?
: help with possible commandss
: (on a resource): open a shell in the container<enter>
: (on a resource): view the resource contenty
: (on a resource): display yaml of the resource
Examples¶
-
Default k9s view
-
Describe of a Pods
Next¶
Leave the shell and use a 100% UI application in next chapter !