### Install K9s with pkg Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on FreeBSD using pkg. ```shell pkg install k9s ``` -------------------------------- ### Install K9s on Ubuntu with apt Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Ubuntu by downloading the .deb package and installing it with apt. ```shell wget https://github.com/derailed/k9s/releases/latest/download/k9s_linux_amd64.deb && sudo apt install ./k9s_linux_amd64.deb && rm k9s_linux_amd64.deb ``` -------------------------------- ### Install K9s with Go install Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s via Go; note that this installs the dev version. ```shell # NOTE: The dev version will be in effect! go install github.com/derailed/k9s@latest ``` -------------------------------- ### Install K9s with Webi on Windows Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Windows using Webi. ```shell curl.exe -A MS https://webinstall.dev/k9s | powershell ``` -------------------------------- ### Install K9s with Winget Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Windows using Winget. ```shell winget install k9s ``` -------------------------------- ### Install K9s with Scoop Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Windows using Scoop. ```shell scoop install k9s ``` -------------------------------- ### Install K9s with Chocolatey Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Windows using Chocolatey. ```shell choco install k9s ``` -------------------------------- ### k9s context-specific config.yaml example with readOnly and skin Source: https://github.com/derailed/k9s/blob/master/change_logs/release_v0.30.0.md Example of a per-context k9s configuration file. Demonstrates setting the cluster name, making a context read-only, selecting a custom skin, specifying the active namespace and favorites, setting the initial view to deployments (dp), disabling the nodeShell feature gate, and limiting port-forward to localhost. ```yaml # $XDG_DATA_HOME/k9s/clusters/bumblebeetuna/blee/config.yaml k9s: cluster: bumblebeetuna readOnly: false # [New!] you can now single out a given context and make it readonly. Woof! skin: in_the_navy # [NEW!] you can also skin individual contexts. Woof Woof! namespace: active: all lockFavorites: false favorites: - all - kube-system - default view: active: dp featureGates: nodeShell: false portForwardAddress: localhost ``` -------------------------------- ### Install K9s with zypper Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on OpenSUSE Linux using zypper. ```shell zypper install k9s ``` -------------------------------- ### Install K9s with pkgx Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Linux and macOS using pkgx. ```shell pkgx k9s ``` -------------------------------- ### Install K9s with dnf Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Fedora 42+ using dnf. ```shell dnf install k9s ``` -------------------------------- ### Install K9s with snap Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Linux using snap with devmode. ```shell snap install k9s --devmode ``` -------------------------------- ### Jump from ArgoCD Application to Deployments Source: https://github.com/derailed/k9s/blob/master/README.md Example jump from an ArgoCD Application to Deployments. Uses a labelSelector with a Go template to match the app.kubernetes.io/instance label. ```yaml jumps: "argoproj.io/v1alpha1/applications": targetGVR: "apps/v1/deployments" labelSelector: "app.kubernetes.io/instance={{.metadata.name}}" ``` -------------------------------- ### Install K9s with gah Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Linux and macOS using gah. ```shell gah install k9s ``` -------------------------------- ### Install K9s with Homebrew Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on macOS or Linux using Homebrew. ```shell brew install derailed/k9s/k9s ``` -------------------------------- ### Install K9s with pacman Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Arch Linux using pacman. ```shell pacman -S k9s ``` -------------------------------- ### Install K9s with Webi on Linux/macOS Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on Linux and macOS using Webi. ```shell curl -sS https://webinstall.dev/k9s | bash ``` -------------------------------- ### Jump from Karpenter NodePool to Nodes Source: https://github.com/derailed/k9s/blob/master/README.md Example jump from a Karpenter NodePool to Nodes. Uses a labelSelector with a Go template and sets targetNamespace to 'all' because nodes are cluster-scoped. ```yaml jumps: "karpenter.sh/v1/nodepools": targetGVR: "v1/nodes" labelSelector: "karpenter.sh/nodepool={{.metadata.name}}" targetNamespace: "all" # Nodes are cluster-scoped ``` -------------------------------- ### Build and run k9s from source Source: https://github.com/derailed/k9s/blob/master/README.md Builds k9s from source and runs the resulting executable. Requires Go v1.23.X or above and a cloned repository. ```shell make build && ./execs/k9s ``` -------------------------------- ### K9s static config.yaml example Source: https://github.com/derailed/k9s/blob/master/change_logs/release_v0.30.0.md Static main K9s configuration file, now read-only and stored at $XDG_CONFIG_HOME/k9s/config.yaml. It is autogenerated with defaults if not found. Includes new ui level, shellPod, imageScans exclusions, logger, and thresholds settings. ```yaml # $XDG_CONFIG_HOME/k9s/config.yaml # File will be autogenerated with all the default fixins if not found in the config specification. k9s: liveViewAutoRefresh: false refreshRate: 2 maxConnRetry: 5 readOnly: false noExitOnCtrlC: false ui: # NOTE! New level!! enableMouse: false headless: false logoless: false crumbsless: false noIcons: false skipLatestRevCheck: false disablePodCounting: false # ShellPod configuration applies to all your clusters shellPod: image: busybox:1.35.0 namespace: default limits: cpu: 100m memory: 100Mi # ImageScan config changed from v0.29.0! imageScans: enable: false # Now figures exclusions ie excludes certain namespaces or specific workload labels exclusions: # Exclude the following namespaces for image vulscans! namespaces: - kube-system - fred # Exclude the following labels from image vulscans! labels: k8s-app: - kindnet - bozo env: - dev logger: tail: 100 buffer: 5000 sinceSeconds: -1 fullScreenLogs: false textWrap: false showTime: false thresholds: cpu: critical: 90 warn: 70 memory: critical: 90 warn: 70 ``` -------------------------------- ### Install K9s with MacPorts Source: https://github.com/derailed/k9s/blob/master/README.md Install K9s on macOS using MacPorts. ```shell sudo port install k9s ``` -------------------------------- ### Configure prompt styles in skin.yml Source: https://github.com/derailed/k9s/blob/master/change_logs/release_v0.24.12.md Adds a 'prompt' section to the K9s skin configuration file to customize prompt colors. Place this in $HOME/.k9s/skin.yml. ```yaml # $HOME/.k9s/skin.yml k9s: body: fgColor: aqua bgColor: black logoColor: purple # Prompt styles prompt: fgColor: blue bgColor: black suggestColor: orange ... ``` -------------------------------- ### Build multi-platform k9s image with make imgx Source: https://github.com/derailed/k9s/blob/master/README.md Builds multi-platform Docker images for linux/amd64 and linux/arm64 using Docker buildx. Requires QEMU emulation, which is included in Docker Desktop but must be enabled on plain Docker Engine. ```shell make imgx ``` -------------------------------- ### Xray skin configuration in skin.yml Source: https://github.com/derailed/k9s/blob/master/change_logs/release_v0.13.3.md Example of the new xray skin configuration section in $HOME/.k9s/skin.yml. It includes color settings and the showIcons option to enable icon mode, which defaults to false. ```yaml # $HOME/.k9s/skin.yml k9s: body: fgColor: dodgerblue bgColor: black logoColor: orange ... xray: fgColor: blue bgColor: black cursorColor: aqua graphicColor: darkgoldenrod # NOTE! Show xray in icon mode. Defaults to false!! showIcons: true ``` -------------------------------- ### Start K9s in debug mode Source: https://github.com/derailed/k9s/blob/master/README.md Start K9s in debug mode using the -l debug flag. ```shell k9s -l debug ```