K9s keyboard shortcuts

K9s keys and typed commands for the Kubernetes terminal UI, taken from the README of release v0.51.0 and the in-app help view. One keymap applies on every system K9s runs on. Letter keys are single presses, and anything that starts with a colon or a slash is text typed at the command or filter prompt and confirmed with Enter. Keys that only the source code of single views defines, such as the extra log view toggles, are left out.

88 shortcuts in 7 sections. Checked row by row against K9s README on . Edited by Jay.

Moving through lists 8

K9s prints letter keys in lowercase: press the plain letter unless the row shows Shift, so Shift + G is a capital G.

ActionShortcut
Go to topJumps to the first row; the key is a plain lowercase g.G
Go to bottomJumps to the last row of the resource list.Shift+G
Page upCtrl+B
Page downCtrl+F
Move upK
Move downJ
Move leftH
Move rightListed under navigation in the help view; on resources with logs the same letter opens them.L

Command mode and filters 16

The README prints the inverse filter with a space after the exclamation mark; the release note that introduced it types the pattern straight after it.

ActionShortcut
Open a resource viewWorks with the singular or plural name, the short name or an alias, for example pod or pods.:pod
Open view in a namespaceA namespace name after the resource scopes the list to that namespace.:pod ns-x
Open view with a filterStarts the pod view already narrowed to rows that match fred; added in v0.30.0.:pod /fred
Open view by labelsLists the pods that carry both the app=fred label and the env=dev label.:pod app=fred,env=dev
Open view in another contextShows the pods of context ctx1 and makes it the active K9s context.:pod @ctx1
List and switch contextsOpens the context list; picking one lands in the pod view.:ctx
Switch context directlyChanges to the named context and reopens the view you used last.:ctx context-name
List and switch namespacesOpens the namespace view, where U makes the selected namespace the active one.:ns
List saved screen dumpsShows what was written to file with Ctrl + S; typing sd does the same.:screendump
Open the Pulses viewTyping pu, the short alias, opens the same view.:pulses
Open the XRay viewTakes po, svc, dp, rs, sts or ds as the resource, with or without a namespace.:xray RESOURCE [NAMESPACE]
Open the Popeye viewRuns the Popeye cluster sanitizer that K9s integrates; pop is the short alias.:popeye
Filter the current viewKeeps the rows that match the regular expression typed after the slash./filter
Inverse filterHides every row that matches; this example leaves the pods without fred in their name./!fred
Filter by label selectorNarrows the view with a Kubernetes label selector instead of a name pattern./-l label-selector
Fuzzy filterUses fuzzy matching instead of the default regular expression./-f filter

Resource actions 19

ActionShortcut
Describe resourceD
View YAMLShow the full YAML manifest of the selected resource.Y
Edit resourceDisabled when K9s runs read-only; set the EDITOR or KUBE_EDITOR variable first.E
View logsOffered only on resource types that produce logs.L
View previous logsP
Open shellOpens a shell in a container of the selected pod.S
Attach to containerAttaches to the running container of a pod; the vendor table lists it for pods only.A
Show port-forwardsOpens the port-forward list from a pod, service or container view.F
Port-forwardOpens the port-forward dialog for a pod, service or container.Shift+F
Copy resource namePuts the name of the highlighted row on the clipboard.C
Copy namespaceN
Warp to namespaceWorks when the table has a namespace column.W
Jump to ownerOpens the owning resource, for rows that have an owner.Shift+J
Delete resourceOpens a confirmation dialog; press Tab, then Enter to confirm.Ctrl+D
Kill resourceDeletes at once with no confirmation, like kubectl delete --now.Ctrl+K
Mark itemSelect multiple resources for a bulk action.Space
Mark a rangeMarks every row between your first mark and the highlighted row.Ctrl+Space
Clear all marksCtrl+\
Save resources to fileWrites the current table to a file that the :screendump view lists.Ctrl+S

Actions in specific views 12

One letter can do different jobs depending on the view: U uses a namespace, shows UsedBy or cordons a node, and R drains a node or restarts a workload.

ActionShortcut
Use namespaceIn the namespace view, makes the selected namespace the active one.U
Show UsedByOn service accounts, PVCs, secrets and config maps, lists what refers to the selected item.U
Cordon or uncordon nodeNode view only; flips the selected node between cordoned and uncordoned.U
Drain nodeAvailable in the node view, for the node under the cursor.R
Restart resourceApplies to deployments, daemon sets and stateful sets.R
Roll backOffered in the ReplicaSets view only.Ctrl+L
View ReplicaSetsPressed in the deployment view to list replica sets.Z
Trigger CronJobRuns from the CronJob view on the selected cron job.T
Run or stop benchmarkStarts or halts a benchmark from the services and port-forwards views.B
Toggle text wrapLog view: switches wrapping of long log lines on or off.W
Toggle timestampsLog view: shows or hides the time in front of each line.T
Toggle full screenWorks in the log, YAML and details views.F

Sorting and display 11

ActionShortcut
Sort by selected columnSorts on the column chosen with Shift + Left or Shift + Right.Shift+O
Sort by nameSort the current resource list alphabetically.Shift+N
Sort by ageOrders the rows by how long each resource has existed.Shift+A
Sort by namespaceOffered only while the view shows all namespaces.Shift+P
Sort by statusShift+S
Select previous columnMoves the column selection that Shift + O sorts by one step to the left.Shift+Left
Select next columnMoves the column selection that Shift + O sorts by one step to the right.Shift+Right
Toggle wide columnsAdds the columns a view keeps for wide mode, or hides them again.Ctrl+W
Toggle faultsShows only the resources that are in an error state; press again for all rows.Ctrl+Z
Toggle headerCtrl+E
Toggle breadcrumbsCtrl+G

Starting and quitting 8

ActionShortcut
Show the K9s versionk9s version
Show runtime infoPrints where K9s keeps its logs and configuration files.k9s info
List CLI optionsk9s help
Start in a namespaceReplace mycoolns with the namespace K9s should open in.k9s -n mycoolns
Start in a contextOpens K9s in the named kubeconfig context; coolCtx is a placeholder.k9s --context coolCtx
Start read-onlyTurns off every command that would modify the cluster.k9s --readonly
Start in a resource viewLaunches straight into the pod view by running that command at start.k9s -c pod
Quit K9sType :quit or :q at the command prompt, or press the chord.:quitor:qorCtrl+C

Notes

Type a colon, go anywhere

K9s drives Kubernetes the way Vim drives text. : opens command mode — type a resource name, short name or alias (:pod, :ns, :ctx) and press Enter to switch views; Ctrl + A lists every alias if you forget one. / filters the current table, 0 widens the view to all namespaces, and Enter opens the highlighted row while Esc climbs back out. ? shows context-sensitive help for whatever view you are in.

Actions apply to the highlighted row: D describes, Y shows YAML, E edits in the editor named by your EDITOR or KUBE_EDITOR variable, L shows logs, S opens a shell in the container, A attaches, and Shift + F sets up a port-forward without ever typing a kubectl command. Space marks multiple rows so one delete covers them all.

Finding the resource hog

The key table of v0.51.0 has fixed sort keys for a few columns only: Shift + N orders by name, Shift + A by age, Shift + S by status and, while all namespaces are shown, Shift + P by namespace. It lists no dedicated CPU or memory sort key. For any other column, move the column selection with Shift + Left and Shift + Right, then press Shift + O to sort by it. Combined with 0 for all namespaces, any column can rank the whole cluster. Ctrl + C quits K9s when you are done.

Questions

What is the difference between Ctrl + D and Ctrl + K?

Ctrl + D is a normal delete: K9s opens a confirmation dialog and you press Tab, then Enter to confirm. Ctrl + K kills immediately with no confirmation dialog — the K9s README describes it as equivalent to kubectl delete --now. Reach for K only when a pod is stuck and refusing to die politely.

How do I jump between resource types quickly?

Command mode: press :, type the resource name, short name or alias and press Enter — :pod for pods, :ns for namespaces, :ctx for contexts. Ctrl + A shows the full alias table, - flips back to the previous command and [ and ] walk the command history.

What is the fastest log-check workflow?

Filter with / to isolate the pod, then L to open its logs; Esc returns to the table. For deeper poking, S opens a shell inside the container directly — the kubectl exec dance reduced to one key.

When do I use / versus : ?

/ narrows what you are looking at — it filters the current table. : changes what you are looking at — it switches to a different resource view. Filter with slash, navigate with colon.

How do I operate on several pods at once?

Mark them with Space — each press toggles the highlighted row — or mark a whole stretch with Ctrl + Space, then press Ctrl + D once: the confirmation asks about all marked items together. Ctrl + \ clears the marks again.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

2 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.