k9s
21 commands
21 shown
Launch k9s for namespace
Open k9s scoped to a single namespace
k9s -n <ns>
Launch k9s with context
Open k9s using a specific kubeconfig context
k9s --context <context>
k9s — view resource type
Switch resource view: :pods, :svc, :helmreleases, :ns
# In k9s press ':' then type 'helmreleases' or 'kustomizations'
k9s — filter resources
Type / and a pattern to filter the displayed resources
# In k9s press '/' to filter by name pattern
k9s — describe resource
Show kubectl describe output for highlighted resource
# In k9s press 'd' on selected resource
k9s — logs of pod
Stream logs for the selected pod/container
# In k9s press 'l' on a pod
k9s — shell into pod
Open interactive shell inside the selected pod
# In k9s press 's' on a pod
k9s — delete resource
Delete the selected resource with confirmation
# In k9s press Ctrl+D on selected resource
Filter by label
Filter deployments by label selector in k9s
: deploy / app=myapp
View pod logs
Press l on a pod to stream its logs
l (on selected pod)
Exec into pod
Press s on a pod to open a shell session
s (on selected pod)
Delete resource
Delete the selected Kubernetes resource
ctrl-d (on selected resource)
Describe resource
Show full kubectl describe output for selected resource
d (on selected resource)
Edit resource YAML
Open the resource YAML for editing in k9s
e (on selected resource)
Switch context
Start k9s connected to a specific kubeconfig context
k9s --context my-cluster
k9s — view resource type
Navigate to a resource type by pressing ':' then typing the resource name
:pod
# or :svc :deployment :helmreleases :kustomizations
k9s — filter resources
Filter listed resources by name pattern (press '/' to activate)
/pattern
# Press '/' then type filter string, Esc to clear
k9s — describe resource
Describe selected resource (equivalent to kubectl describe)
d
# Press 'd' on selected resource to view describe output
k9s — logs of pod
View pod logs (press 'l' on pod, '0' for all containers)
l
# Press 'l' on a pod; '0' for all containers, 'w' to wrap
k9s — shell into pod
Open shell in pod container (press 's' on pod)
s
# Press 's' on a pod to open a shell (uses first container)
k9s — delete resource
Delete selected resource (press Ctrl+D, confirm with Enter)
ctrl-d
# Press Ctrl+D on selected resource, confirm with Enter
no commands match