5 Must-Have Tools to Supercharge Your Kubernetes Workflow
This article introduces five powerful, open‑source command‑line tools—K9s, Popeye, kube‑bench, kubectx/kubens with fzf, and Stern (plus Bat)—that enhance productivity when working with Kubernetes clusters, complete with installation commands and usage examples.
Kubernetes provides the kubectl CLI for interacting with clusters. For quick local testing, use kind to create a disposable cluster.
# Install kind
brew install kind
# Create a cluster named "playground" using a specific node image
kind create cluster --name playground --image kindest/node:v1.21.141. K9s
K9s is a terminal UI that continuously watches a cluster and lets you navigate namespaces, services, deployments, and pods. It supports log viewing, resource description, manifest editing, and port‑forwarding with keyboard shortcuts.
# Install K9s
brew install k9s2. Popeye
Popeye scans a Kubernetes cluster for configuration inconsistencies, produces a health report, and assigns a grade.
# Install Popeye
brew install derailed/popeye/popeye
# Run the scanner on the current context
popeye3. kube‑bench
kube‑bench validates a cluster against the CIS Kubernetes Benchmark. The project supplies a ready‑made Job manifest that can be applied directly to the cluster.
# Deploy the kube‑bench Job
curl https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml | kubectl apply -f -
# Retrieve the logs from the pod created by the Job (replace <code><kube-bench-pod></code> with the actual pod name)
kubectl logs <code><kube-bench-pod></code> -f4. kubectx, kubens & fzf
When working with multiple clusters or environments, kubectx switches between Kubernetes contexts and kubens switches namespaces. Pair them with fzf for an interactive fuzzy finder.
# Install utilities
brew install kubectx kubens fzf
# Example: list and select a namespace interactively
kubens $(kubens | fzf)5. Stern
Stern aggregates logs from multiple pods that match a label or name pattern and color‑codes each pod’s output, making it easy to follow concurrent processes.
# Install Stern
brew install stern
# Tail logs from all pods whose name contains "deploy"
stern deployBonus: Bat
Bat is a drop‑in replacement for cat with syntax highlighting, Git integration, and theme support, useful for quickly inspecting YAML or other source files.
# Install Bat
brew install bat
# List available themes
bat --list-themes
# View a file with syntax highlighting
bat deployment.yamlReference Links
kind – https://kind.sigs.k8s.io/
K9s – https://github.com/derailed/k9s
kube‑bench – https://github.com/aquasecurity/kube-bench
Popeye – https://github.com/derailed/popeye
kubectx/kubens – https://github.com/ahmetb/kubectx
fzf – https://github.com/junegunn/fzf
Stern – https://github.com/wercker/stern
Bat – https://github.com/sharkdp/bat
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Cloud Native Technology Community
The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
