k9s
K9s is a terminal-based UI to interact with your Kubernetes clusters. It makes it easier to navigate, observe, and manage your deployed applications.
Prerequisites
- kubectl - Must be installed and configured
- Configuration - Cluster access configured
Installation
Official installation guide: k9scli.io/topics/install
- Windows
- macOS
- Linux
# Using Chocolatey
choco install k9s
# Using winget
winget install Derailed.k9s
Or download from GitHub Releases.
# Using Homebrew
brew install k9s
# Using Homebrew
brew install k9s
# Using snap
sudo snap install k9s
Or download from GitHub Releases.
Verify Installation
k9s version
Usage
# Launch k9s (uses current kubectl context)
k9s
# Launch with specific context
k9s --context <context-name>
# Launch with specific namespace
k9s -n <namespace>
Key Bindings
Once inside k9s, use these keyboard shortcuts:
| Key | Action |
|---|---|
: | Command mode (type resource names) |
/ | Filter resources |
d | Describe selected resource |
l | View logs |
s | Shell into container |
e | Edit resource |
ctrl-d | Delete resource |
y | View YAML |
? | Help |
ctrl-a | Show all available resource types |
ctrl-c | Exit |
tip
Tab completion works in command mode for faster navigation.
Resource Navigation
Type these in command mode (:) to navigate resources:
| Command | Resource |
|---|---|
:pods or :po | Pods |
:services or :svc | Services |
:deployments or :dp | Deployments |
:nodes or :no | Nodes |
:namespaces or :ns | Namespaces |
:configmaps or :cm | ConfigMaps |
:secrets | Secrets |
Related
- k9s Documentation - Official documentation
- k9s GitHub - Source code and releases