k9s commands

21 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 21 shown

  • k9s -n <ns>

    Open k9s scoped to a single namespace

  • k9s --context <context>

    Open k9s using a specific kubeconfig context

  • # In k9s press ':' then type 'helmreleases' or 'kustomizations'

    Switch resource view: :pods, :svc, :helmreleases, :ns

  • # In k9s press '/' to filter by name pattern

    Type / and a pattern to filter the displayed resources

  • # In k9s press 'd' on selected resource

    Show kubectl describe output for highlighted resource

  • # In k9s press 'l' on a pod

    Stream logs for the selected pod/container

  • # In k9s press 's' on a pod

    Open interactive shell inside the selected pod

  • # In k9s press Ctrl+D on selected resource

    Delete the selected resource with confirmation

  • : deploy / app=myapp

    Filter deployments by label selector in k9s

    k8s · filter · labels

  • l (on selected pod)

    Press l on a pod to stream its logs

    k8s · logs · pods

  • s (on selected pod)

    Press s on a pod to open a shell session

    k8s · exec · pods

  • ctrl-d (on selected resource)

    Delete the selected Kubernetes resource

    k8s · delete

  • d (on selected resource)

    Show full kubectl describe output for selected resource

    k8s · describe

  • e (on selected resource)

    Open the resource YAML for editing in k9s

    k8s · edit · yaml

  • k9s --context my-cluster

    Start k9s connected to a specific kubeconfig context

    k8s · context · kubeconfig

  • :pod # or :svc :deployment :helmreleases :kustomizations

    Navigate to a resource type by pressing ':' then typing the resource name

  • /pattern # Press '/' then type filter string, Esc to clear

    Filter listed resources by name pattern (press '/' to activate)

  • d # Press 'd' on selected resource to view describe output

    Describe selected resource (equivalent to kubectl describe)

  • l # Press 'l' on a pod; '0' for all containers, 'w' to wrap

    View pod logs (press 'l' on pod, '0' for all containers)

  • s # Press 's' on a pod to open a shell (uses first container)

    Open shell in pod container (press 's' on pod)

  • ctrl-d # Press Ctrl+D on selected resource, confirm with Enter

    Delete selected resource (press Ctrl+D, confirm with Enter)