kubernetes k9s - ghdrako/doc_snipets GitHub Wiki

Install ubuntu

If you dont have snap:

$ sudo apt update
$ sudo apt install snapd

If you DON'T have the k9s snap installed, then

$ snap install k9s --channel=latest/stable

If you DO already have the k9s snap installed, then

$ snap refresh k9s --channel=latest/stable

Information

$ snap info k9s

Start

$ snup run k9s

Execute

k9s help                      # List all available CLI options
k9s info                      # Get info about K9s runtime (logs, configs, etc..)
k9s -n mycoolns               # Run K9s in a given namespace.
k9s -c pod                    # Run K9s and launch in pod view via the pod command.
k9s --context coolCtx         # Start K9s in a non default KubeConfig context
k9s --readonly                # Start K9s in readonly mode - with all modification commands disabled

Using

Command Action Comments
? Show active keyboard mnemonics and help
:q, ctrl-c Exit
:po⏎ View a Kubernetes resource using singular/plural or short-name
:rb⏎ View role binding
:cj⏎ View Cronjob
:svc⏎ View service
:deploy⏎ View deployment
:namespace⏎ View namespace
shift-f port forward
:pf ctrl-d remove port forward
ctrl-d remove resource
esc Bails out of view/command/filter mode
/filter⏎ Filter out a resource view given a filter Regex2 supported ie fred
/! filter⏎ Inverse regex filer
/-l label-selector⏎ Filter resource view by labels