K9s tooling
K9s is a terminal-based tool for managing and monitoring Kubernetes clusters. It provides a visually rich interface for interacting with your cluster and its resources, including pods, nodes, and deployments.
To use K9s, you will need to have a Kubernetes cluster set up and have the kubectl command-line tool installed on your machine. You can then install K9s using the following command:
curl -SL https://github.com/derailed/k9s/releases/latest/download/k9s_Linux_x86_64.tar.gz | tar -xzv
Once K9s is installed, you can start it by running the k9s command in your terminal. This will open the K9s interface, which is divided into several panes:
The left pane shows a list of all the resources in your cluster, organized by type (e.g. pods, nodes, deployments). The top right pane shows details about the selected resource, such as its status, labels, and events. The bottom right pane shows the logs for the selected resource. To navigate the K9s interface, you can use the following key shortcuts:
gGo to a specific resource or view (e.g. g p for pods, g d for deployments).sSearch for a specific resource or label.SpaceSelect the next resource in the list.Shift+ Space Select the previous resource in the list.EnterOpen the selected resource in a new terminal window.Ctrl + cClose the selected resource.qQuit K9s and return to the terminal.kKill the selected resource.yYank (copy) the selected resource to the clipboard.pPaste (create) the yanked resource.eEdit the selected resource.rRestart the selected resource.hToggle the visibility of the help screen.lToggle the visibility of the logs pane.wToggle the visibility of the top right pane.tToggle between different views in the top right pane (e.g. resource details, events, config).oOpen the selected resource in a browser.fFollow the logs for the selected resource.bToggle the visibility of the bottom right pane.iShow resource info in the top right pane.uUpdate the selected resource.xExecute a command in the selected resource.
There are many other key shortcuts available in K9s, and you can see a full list by pressing ? in the K9s interface.