what is k9s and why is it needed?

  • k9s is an open source terminal based ui that simplifies the management and monitoring of k8s clusters by providing an interactive way to view and manage resources like - pods, deployments, and services
  • read - https://k9scli.io/

commands in k9s

  • pressing num keys will list pods in specific namespaces ex- 0 (for all namespaces), 1 (for namespace a), 2 (for namespace b) etc.
  • use vim navigations to travel the list (h, j, k, l)
  • shift + a → sort based on age of the pod
  • shift + s → sort based on status (running or completed)
  • press ā€œlā€ while on any pod to see its logs
  • search anything like vim using ā€/ā€
  • : → change resources - pods, deployments, namespaces, services Note: to check logs natively using kubectl command do the following:
kubectl logs <podname> | less
  • attach to pods directly by pressing ā€œsā€ by opening shell
  • press ā€œdā€ to go to the description of a pod
  • shift + f → port forward options
  • press ā€œeā€ on any resource to edit it live
  • press ā€œyā€ to get the yaml for the resource
  • ctrl + k to kill/delete a resource
  • k9s is just like a native unix tool making the keybindings extremely evident Note: when doubtful use the ā€?ā€ on any resource to see the keybindings or refer official docs

kubernetes

202509201949