Keyboard shortcuts
On Linux and Windows, read ⌘ as Ctrl. Single keys such as j or / work when the cursor isn’t in a text field. Browsers keep a few keys for themselves whatever a page does, and KubeGlass uses none of them on the platform they’re kept on (see Dock). Press ? for the same list inside KubeGlass, written for your platform. The extensions file can add keys of your own; these come first.
Anywhere
Section titled “Anywhere”| Keys | Action |
|---|---|
⌘K |
Open or close the command palette |
⌘⇧P |
Open the command palette (not in Firefox, which keeps it for a private window) |
: |
Open the palette to jump to a kind or a page, as in k9s |
> |
Open the palette’s commands |
/ |
Focus the page’s filter |
n |
Open the namespace picker |
1–9 |
Open tab N on pages with tabs |
⌘⇧K |
Open the cluster switcher |
⌘B |
Show or hide the sidebar |
⌘Z |
Bring back an object you just deleted from its page (for 30 seconds) |
? |
Show or hide the shortcut list |
Command palette
Section titled “Command palette”| Type | To |
|---|---|
| A name | Find pages, kinds, applications and objects in every namespace you can read, by name, label (app=web too), image, state (crash, pending, oom) or IP address. A node’s name or IP also finds the pods on it |
Tab |
Search every cluster instead of the current one, and the current one again. Enter on another cluster’s object switches there and opens it |
: and a kind or page |
Open it: :po, :deploy, :svc, :crd, :certificates, :apps, :helm, :timeline, :alerts, :checks, :upgrade, :kinds |
: kind and namespace |
Open the list in that namespace: :po kube-system, or every namespace with :po all |
: kind and a filter or cluster |
As in k9s: :po /web filters the list by text, :po app=web or :po -l app=web by label, and :po @prod opens it on another cluster. They go together: :po kube-system app=web |
:ctx, :ctx NAME |
Switch cluster: :ctx lists the clusters, :ctx prod the ones that match |
:ns NAME |
Switch to that namespace. :ns alone opens the Namespaces list |
:pulse, :popeye, :xray |
The k9s views: the Overview, Security › Checks, and the related resources of the object whose page is open (Applications elsewhere) |
:changes, :events |
The Timeline with only changes, or only Kubernetes events |
:pf |
Clusters › Port forwards |
:aliases |
Every : command with its other names |
:q |
Close the palette |
@ |
Switch to another cluster |
# |
Switch to another namespace |
> |
Commands: >switch cluster, >switch namespace, then on an object’s page >logs, >shell, >yaml, >describe, >events, >history, >related and >copy name, then the rest, such as >terminal new, >create deployment, >save command and the commands you saved (>run …). Preferences such as >theme dark come last |
: takes any kind the cluster serves, by its plural, its kind or a short name, custom resources included, k9s’s own aliases (:dp, :sec, :jo, :cr, :crb, :ro, :rb, :np, and :ep for EndpointSlices), and the names in the extensions file. The best match comes first: the whole name, then names that start with what you typed, then a word in the name, then the letters in order from the first with at most one gap (:dpl). A command that matches none of them says so, and Enter does nothing. A row with a shortcut shows its keys on the right. ↑ and ↓ (or Ctrl J and Ctrl K, as in Vim) move through the results and Enter opens the highlighted one, which is the best match until you move. Esc first goes back to what the palette opened with: :dep, or the cluster list :ctx opens, goes back to : when : opened the palette and to an empty box when ⌘K did. The next Esc closes the palette.
These work in every list under Resources, as in k9s.
| Keys | Action |
|---|---|
j or ↓ |
Move down |
k or ↑ |
Move up |
gg or Home |
First row |
G or End |
Last row |
Enter |
Open the row on its own page (on Namespaces, switch to the namespace) |
Space |
Select or unselect the row |
⇧Space or Ctrl Space |
Select the rows from the last one picked to this one |
⇧F10 |
The row’s menu (also the context menu key or a right-click) |
l |
Logs (pods and workloads) |
p |
Logs of the previous run (pods) |
⇧L |
Logs in the dock |
s |
Shell into a pod, scale a workload, or suspend or resume a CronJob |
y |
YAML |
e |
Edit the YAML |
⇧E |
YAML in the dock, to edit |
d |
Describe the object |
⇧F |
Forward a port of a pod, a Service, or a workload’s ready pod |
⇧J |
Go to the object that controls this one |
x |
Show a Secret’s values |
i |
Set a workload’s images |
t |
Run a CronJob now |
r |
Restart a Deployment, StatefulSet or DaemonSet, after asking |
c |
Copy the name |
⇧K |
Force delete a pod, with no grace period |
Ctrl d |
Delete, after asking |
z |
Only what needs attention, or everything again |
w |
Wide columns on or off, as kubectl -o wide |
⇧N ⇧A ⇧S ⇧R ⇧C ⇧M |
Sort by name, age, status, restarts, CPU or memory; again for the other way |
0 |
Show every namespace |
1–9 |
Show a favorite namespace: the ones you starred in the namespace picker, then the others in the order you first used them, each keeping its number |
u |
On Namespaces, switch to the namespace and go back to the list before (⌘Enter opens it) |
Esc |
Clear the filter, then the selection, then close the pane beside the list |
With rows selected, r, t, ⇧K, Ctrl d and (except on pods) s act on all of them. In the filter, ↓ or Enter moves to the first row and Esc clears the filter.
When the pane beside a list is on, l, p, s, y and d open the object in the pane on that tab, and the pane follows j and k. On the splitter between the list and the pane, ← and → change the pane’s width (with ⇧, in bigger steps), and Home and End make it as wide or as narrow as it goes.
Detail pages
Section titled “Detail pages”| Keys | Action |
|---|---|
1–9 |
Open tab N: Overview, Logs, Shell, YAML, Events and so on, as the page shows them |
l |
Logs |
⇧L |
Logs in the dock |
s |
Shell into a pod, scale a workload, or suspend or resume a CronJob |
y |
YAML |
d |
Describe |
e |
Edit the YAML |
⇧E |
YAML in the dock, to edit |
⇧F |
Forward a port of a pod or Service, or of one of a workload’s ready pods |
r |
Restart a workload |
t |
Run a CronJob now |
Ctrl d |
Delete, with grace period and cascade options |
Esc or Backspace |
Up to the list, its filter kept |
In the pane beside a list the list’s keys work instead, and 1–9 pick namespaces.
YAML editor
Section titled “YAML editor”With the focus in the editor of a YAML tab, a dock YAML tab, Create or apply, the Helm values or the extensions file. The editor is Monaco, so these are VS Code’s keys. See The YAML editor.
| Action | Mac | Linux and Windows |
|---|---|---|
| Apply the changes, in a YAML tab | ⌘S |
Ctrl+S |
| Find | ⌘F |
Ctrl+F |
| Find and replace | ⌥⌘F |
Ctrl+H |
| Comment or uncomment the lines | ⌘/ |
Ctrl+/ |
| Move the lines up / down | ⌥↑ / ⌥↓ |
Alt+↑ / Alt+↓ |
| Add a cursor above / below | ⌥⌘↑ / ⌥⌘↓ |
Ctrl+Alt+↑ / Ctrl+Alt+↓ on Windows, Shift+Alt+↑ / Shift+Alt+↓ on Linux |
| Go to line | ⌃G |
Ctrl+G |
| Next / previous YAML mistake | F8 / ⇧F8 |
F8 / Shift+F8 |
| Fold / unfold the section | ⌥⌘[ / ⌥⌘] |
Ctrl+Shift+[ / Ctrl+Shift+], except in a dock tab, where they go to the previous and next tab |
| The editor’s menu | Right-click, or ⇧F10 |
Right-click, or Shift+F10 |
In Edit values on a Secret’s or a ConfigMap’s Overview, ⌘↵ or ⌘S (Ctrl+Enter or Ctrl+S) applies and Esc cancels. See Secret and ConfigMap values.
In the log viewer, while the focus is in it and not in a field; on an object’s Logs tab also while the focus is on the page’s tabs or nowhere, apart from the digits, and n and N only while there is a filter. See Logs.
| Keys | Action |
|---|---|
/ or ⌘F |
Filter the lines (a regex, or text) |
n, or Enter in the filter |
Next match |
⇧N, or ⇧Enter in the filter |
Previous match |
s |
Follow the newest line, or stop |
G |
Go to the newest line and follow |
g |
Go to the first line |
w |
Wrap long lines |
t |
Show or hide times |
j |
Expand JSON lines |
f |
Full screen |
1–5 |
Last 1m, 5m, 15m, 30m or 1h |
0 |
Back to the line count you last picked (Last 500 lines to start with) |
p |
Current run or the run before the last restart |
c |
Copy the lines shown |
⌘S |
Download the lines shown |
Esc |
Clear the filter, then leave full screen |
Clusters
Section titled “Clusters”On Clusters › All clusters:
| Keys | Action |
|---|---|
j k or ↓ ↑ |
Move down and up |
gg / G |
First / last row |
Enter |
Switch to the cluster. For one that doesn’t answer, show why |
o or Space |
Open or close the row’s details |
l or → |
Open the details |
h or ← |
Close the details |
p |
Pin or unpin |
Esc |
Close the details, then clear the filter |
These work with the focus in the dock; showing the dock and a new tab work from anywhere. Browsers keep some keys whatever a page does: Chrome and Edge keep ⌘T, ⌘W, ⌘⇧T, ⌘⇧W, ⌘⇧N, ⌘⇧[ and ⌘⇧] on a Mac, and Ctrl+T, Ctrl+W, Ctrl+N, their Shift forms and Ctrl+Tab on Linux and Windows; Firefox also keeps ⌘⇧P and Ctrl+Shift+P. So the dock’s keys differ between the two. A shell keeps its own keys: on a Mac its Ctrl keys, and on Linux and Windows every Ctrl key without Shift, so there only the keys with Shift work in a shell; click the tab bar for the rest. Alt and an arrow key go to the shell on every platform.
| Action | Mac | Linux and Windows |
|---|---|---|
| Show or hide the dock | ⌘` or ⌃⇧` |
Ctrl+` |
| New dock tab | ⌃⇧T |
Ctrl+Shift+`, as in VS Code |
| Close the tab (not a pinned one) | ⌃⇧W |
The tab’s × |
| Previous / next tab | ⌃⇧[ / ⌃⇧] |
Ctrl+Shift+[ / Ctrl+Shift+] |
| Tab 1 to 9 | ⌘1–⌘9 |
Ctrl+1–Ctrl+9, outside a shell |
| Split side by side | ⌘D |
Ctrl+D, outside a shell |
| Split one above the other | ⌘⇧D |
Ctrl+Shift+D |
| Move between panes | ⌥ and an arrow key, or ⌃H ⌃J ⌃K ⌃L, outside a shell |
Alt and an arrow key, or Ctrl+H J K L, outside a shell |
| Cycle panes backward / forward | ⌘[ / ⌘] |
Ctrl+[ / Ctrl+], outside a shell |
| Zoom or unzoom a pane | ⌘⇧Enter |
Ctrl+Shift+Enter |
| Full screen | ⌘⇧F |
The toolbar’s button |
| Search the scrollback | ⌘F |
Ctrl+Shift+F, as in Windows Terminal and GNOME Terminal, or Ctrl+F outside a shell |
| Clear the terminal | ⌘K |
The toolbar’s button |
| Zoom in / out / reset | ⌘= / ⌘- / ⌘0 |
Ctrl+= / Ctrl+- / Ctrl+0, outside a shell |
| Broadcast typing to every session | ⌘⇧B |
Ctrl+Shift+B |
| Show or hide the quick commands bar | ⌘⇧P (not in Firefox) |
Ctrl+Shift+P (not in Firefox) |
| Colon commands | :, with the focus in the dock but not in a shell or a field |
the same |
| Close a tab, or unpin a pinned one | Delete on the tab |
the same |
| The tab’s actions menu | ⇧F10 on the tab |
Shift+F10 on the tab |
With the focus in a shell on a Mac, ⌘K clears it instead of opening the command palette; anywhere in the dock, ⌘⇧P (Ctrl+Shift+P) shows the quick commands bar instead of opening the palette. In a logs or YAML tab only the tab keys (a new tab, tab 1 to 9, the previous and next tab) and : are the dock’s, so the log viewer and the editor keep ⌘F, ⌘D and their other keys. The colon commands, such as :split and :wq, are also in the dock’s More menu; see Terminal.