Kubectl & CLI Tools
kubectl, k9s, kubectx, stern — the daily driver toolkit.
Core
- ★ kubectl — the official CLI. Learn it; everything else is a wrapper.
- ★ kubectx + kubens — context / namespace switchers; ubiquitous.
- ★ k9s — TUI dashboard; navigate clusters interactively. Most-loved tool in the ecosystem.
- stern — multi-pod log tailer; far better than
kubectl logs.
kubectl plugins (via krew)
- ★ krew — kubectl plugin manager; install everything below with
kubectl krew install …. kubectl-tree— show ownerReferences as a tree.kubectl-neat— strip generated cruft from manifests.kubectl-view-secret— decoded secret values.kubectl-images— list images per pod / cluster.kubectl-warp— port-forward + interactive shell.kubectl-debug— ephemeral debug containers.kubectl-trace— bpftrace inside pods.kubectl-rolesum— summarize RBAC for a user / SA.kubectl-konfig— kubeconfig manipulation.
GUI / web dashboards
- ★ Lens — desktop GUI; extensive features; freemium.
- ★ Headlamp — open-source Lens alternative; CNCF.
- Octant (VMware, archived) — once-popular dashboard.
- k8sgpt — diagnostic CLI; explains why things are broken.
- Kubernetes Dashboard — official; clunky but works.
- Rancher Dashboard — multi-cluster UI bundled with Rancher.
Port forwarding / connection
- ★
kubectl port-forward— boring; works. - kubefwd — forward all services in a namespace at once with hostname rewriting.
- Telepresence / mirrord — proxy local services into remote cluster.
Manifest manipulation
yq—jqfor YAML; essential.- kustomize — built into kubectl.
- kubeconform — validate against schemas.
- kube-linter — best-practice scan.
Multi-cluster
kubeconfig— flatten multiple clusters into one file.- kubie — better kubectx with shell prompt integration.
- kubeshift — switch context + namespace in one command.
Productivity tips
- ★ Aliases.
k=kubectl,kgp=kubectl get pods, etc. Most shells have premadekubectlalias bundles. - Shell completion.
kubectl completion+kubectx+kubenscompletion. KUBECONFIGwith multiple files:export KUBECONFIG=~/.kube/config:./project.kube.KUBECTL_EXTERNAL_DIFF=dyfffor human-readable diffs.- kubectl
-o jsonpath=…for scripting; or pipe throughyq.
Don't sleep on
kubectl explain— built-in schema docs for every resource type.kubectl events --watch— watch cluster events in real time.kubectl debug— ephemeral containers attached to a running pod.kubectl alpha events— newer events viewer with better UX.
Pick this if…
- Default daily driver: kubectl + krew + kubectx + kubens + k9s + stern.
- Visual cluster browsing: Lens or Headlamp.
- Debugging confusing failures: k8sgpt +
kubectl debug. - Multiple namespaces of services: kubefwd.
- Local ↔ remote during dev: Telepresence or mirrord.