platform-support

A knowledge base where we share helpful tips for platform engineers and teams who write code for them

View on GitHub

Kubernetes Tools Reference

This guide provides information on essential tools for Kubernetes cluster management, troubleshooting, and operations.

Core Tools

kubectl

The official Kubernetes command-line tool.

Installation:

# Linux
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

# macOS
brew install kubectl
# or
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

# Windows
choco install kubernetes-cli
# or
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/windows/amd64/kubectl.exe"

Key Features:

Useful Extensions:

Helm

Package manager for Kubernetes.

Installation:

# Linux/macOS
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Windows
choco install kubernetes-helm

Basic Usage:

# Add repository
helm repo add bitnami https://charts.bitnami.com/bitnami

# Search charts
helm search repo bitnami

# Install chart
helm install my-release bitnami/nginx

# List releases
helm list

# Upgrade release
helm upgrade my-release bitnami/nginx --values custom-values.yaml

# Uninstall release
helm uninstall my-release

Key Features:

k9s

Terminal-based UI for managing Kubernetes clusters.

Installation:

# Linux/macOS
brew install derailed/k9s/k9s

# Linux
curl -sS https://webinstall.dev/k9s | bash

# Windows
choco install k9s

Key Features:

Diagnostic Tools

kubectl-debug

Debug running pods with ephemeral containers.

Installation:

kubectl krew install debug

Usage:

kubectl debug <pod-name> -it --image=nicolaka/netshoot

Key Features:

Stern

Multi-pod and container log tailing.

Installation:

# Linux/macOS
brew install stern

# Using go
go install github.com/stern/stern@latest

Usage:

# Tail logs from all pods with name containing "app"
stern app

# Tail logs for specific containers
stern app -c container1 -c container2

Key Features:

kubectx and kubens

Fast way to switch between contexts and namespaces.

Installation:

# Linux/macOS
brew install kubectx

# Using Krew
kubectl krew install ctx
kubectl krew install ns

Usage:

# Switch context
kubectx <context-name>

# Switch namespace
kubens <namespace>

Key Features:

Development Tools

Skaffold

Continuous development for Kubernetes applications.

Installation:

# Linux/macOS
brew install skaffold

# Linux/Windows/macOS
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
chmod +x skaffold
sudo mv skaffold /usr/local/bin

Key Features:

Kustomize

Template-free way to customize Kubernetes configurations.

Installation:

# Built into kubectl
kubectl kustomize

# Standalone
brew install kustomize

Key Features:

Monitoring and Visualization

Prometheus and Grafana

Monitoring and visualization stack.

Installation:

# Using Helm
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus prometheus-community/prometheus
helm install grafana grafana/grafana

Key Features:

Lens

Kubernetes IDE with rich features.

Installation: Download from Lens website

Key Features:

Cluster Management

kubeadm

Tool for cluster bootstrapping.

Installation:

apt-get update && apt-get install -y kubeadm

Key Features:

kops

Production-grade cluster installation, upgrade, management.

Installation:

# Linux/macOS
brew install kops

Key Features:

Rancher

Complete container management platform.

Installation:

helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm install rancher rancher-latest/rancher \
  --namespace cattle-system \
  --create-namespace \
  --set hostname=rancher.example.com

Key Features:

GitOps Tools

ArgoCD

Declarative GitOps continuous delivery tool.

Installation:

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Key Features:

Flux

GitOps toolkit for Kubernetes.

Installation:

# Using Flux CLI
curl -s https://fluxcd.io/install.sh | sudo bash
flux bootstrap github \
  --owner=<username> \
  --repository=<repository> \
  --personal

Key Features:

Security Tools

Trivy

Container vulnerability scanner.

Installation:

# Linux/macOS
brew install aquasecurity/trivy/trivy

# apt-based Linux
sudo apt-get install -y trivy

Usage:

trivy image nginx:latest

Key Features:

kube-bench

Kubernetes CIS benchmark testing.

Installation:

kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml

Key Features:

Network Tools

kubeshark

API traffic analyzer for Kubernetes.

Installation:

# Linux/macOS
brew tap kubeshark/kubeshark
brew install kubeshark

# Script install
sh <(curl -Ls https://kubeshark.co/install)

Key Features:

Cilium

Advanced networking and security.

Installation:

helm repo add cilium https://helm.cilium.io/
helm install cilium cilium/cilium --namespace kube-system

Key Features:

See Also

hypermedia tech logo