3.2 Browse Resources

Kubed gives you an interactive list of resources for each type, that you access with the kubed-list-resources commands, such as kubed-list-pods.

These commands are bound to l in Kubed’s type-specific prefix keymaps, most of which are accessible via the global kubed-prefix-map by default (see Definition of kubed-prefix-map). So if you’ve bound kubed-prefix-map to C-c k, you can pop up the pods list with C-c k p l, the deployments list with C-c k d l, the jobs list with C-c k j l, etc. Normally, Kubed shows the list of resources in the current namespace, but if you invoke these commands with a prefix argument (say, C-u C-c k p l), they first prompt you to select a namespace, and then show resources in the namespace you selected.

The list of resources in shown a buffer called *Kubed resources@namespace[context]*, where context is a kubectl context, and namespace is a namespace in context. For example, Kubed shows the list of pods in namespace ‘default’ for context ‘minikube’ in buffer *Kubed pos@default[minikube]. For non-namespaced resources, the ‘@namespace’ part is omitted.

Each resource type has its own major mode for list buffers with type-specific commands and operations, but they are all also derived from a shared parent mode. The pods list uses the kubed-pods-mode (‘Kubernetes Pods’) major mode, the list of Kubernetes deployments uses kubed-deployments-mode, and so on.

Kubed pods list buffer with the help transient menu visible

Browse your pods, deployments, and other resources with Kubed list buffers

The common parent major mode is kubed-list-mode:

Major Mode: kubed-list-mode

Major mode for listing generic Kubernetes resources.

This mode provides the following commands for all type-specific derived modes:

?

Show help in transient menu (kubed-list-transient).

RET

Display the resource at point in the current window (kubed-list-select-resource).

o

Display the resource at point in another window and select that window (kubed-list-select-resource-other-window).

C-o

Display the resource at point in another window without selecting it (kubed-list-display-resource).

D

Delete the resource at point (kubed-list-delete).

e

Edit the resource at point (kubed-list-edit).

P

Patch the resource at point (kubed-list-patch).

g

Update the resources list by fetching new information from Kubernetes (kubed-list-update).

/

Filter the current list of resources (kubed-list-set-filter). See Filtering Resource Lists.

d

Mark the resource at point for deletion (kubed-list-mark-for-deletion). Resources marked for deletion have a ‘D’ in the beginning of their line.

x

Delete marked resources (kubed-list-delete-marked).

u

Unmark from resource at point (kubed-list-unmark).

w

Copy name of resource at point into the kill ring (kubed-list-copy-as-kill).

n

Move point to the next line (next-line).

p

Move point to the previous line (previous-line).

TAB

Move point to the next column. If point is already at the last column, move to the first column of the next line instead (kubed-list-next-column).

S-TAB

Move point to the previous column. If point is already at the first column, move to the last column of the previous line instead (kubed-list-previous-column).

S

Sort lines by the column at point (tabulated-list-sort).

|

Fit width of column at point to its content (kubed-list-fit-column-width-to-content). With non-negative prefix argument n (for example, 0 |), fit nth column. With negative prefix argument (- |), fit all columns.

{

Narrow the column at point (tabulated-list-narrow-current-column).

}

Widen the column at point (tabulated-list-widen-current-column).

In addition, you can bookmark any Kubed resources list buffer with the usual C-x r m. See (emacs)Bookmarks.

Note that kubed-list-mode (and its type-specific derivatives) bind the g key, which is commonly bound to revert-buffer, to kubed-list-update. The difference between these commands is that revert-buffer only refreshes the list display, without fetching updated data from Kubernetes. You can still invoke revert-buffer with C-x x g or M-x, if you need it.