Kubernetes Tools Reference
This guide provides information on essential tools for Kubernetes cluster management, troubleshooting, and operations.
Core Tools
Section titled “Core Tools”kubectl
Section titled “kubectl”The official Kubernetes command-line tool.
Installation:
# Linuxcurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"chmod +x kubectlsudo mv kubectl /usr/local/bin/
# macOSbrew install kubectl# orcurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"chmod +x kubectlsudo mv kubectl /usr/local/bin/
# Windowschoco install kubernetes-cli# orcurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/windows/amd64/kubectl.exe"Key Features:
- Manage Kubernetes resources
- View logs and execute commands in containers
- Forward ports and proxy connections
- Apply manifests and configurations
Useful Extensions:
Package manager for Kubernetes.
Installation:
# Linux/macOScurl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Windowschoco install kubernetes-helmBasic Usage:
# Add repositoryhelm repo add bitnami https://charts.bitnami.com/bitnami
# Search chartshelm search repo bitnami
# Install charthelm install my-release bitnami/nginx
# List releaseshelm list
# Upgrade releasehelm upgrade my-release bitnami/nginx --values custom-values.yaml
# Uninstall releasehelm uninstall my-releaseKey Features:
- Package and distribute applications
- Version control for deployments
- Template-based resource generation
- Release management
Terminal-based UI for managing Kubernetes clusters.
Installation:
# Linux/macOSbrew install derailed/k9s/k9s
# Linuxcurl -sS https://webinstall.dev/k9s | bash
# Windowschoco install k9sKey Features:
- Interactive UI for cluster management
- Resource filtering and navigation
- Log viewing and container shell access
- Resource editing and management
- Customizable views and shortcuts
Diagnostic Tools
Section titled “Diagnostic Tools”kubectl-debug
Section titled “kubectl-debug”Debug running pods with ephemeral containers.
Installation:
kubectl krew install debugUsage:
kubectl debug <pod-name> -it --image=nicolaka/netshootKey Features:
- Debug pods without modifying them
- Access running pods with debug tools
- Network and filesystem troubleshooting
Multi-pod and container log tailing.
Installation:
# Linux/macOSbrew install stern
# Using gogo install github.com/stern/stern@latestUsage:
# Tail logs from all pods with name containing "app"stern app
# Tail logs for specific containersstern app -c container1 -c container2Key Features:
- Tail multiple pod logs simultaneously
- Color-coding for different pods/containers
- Regex filtering for pods and containers
- Timestamp and output formatting
kubectx and kubens
Section titled “kubectx and kubens”Fast way to switch between contexts and namespaces.
Installation:
# Linux/macOSbrew install kubectx
# Using Krewkubectl krew install ctxkubectl krew install nsUsage:
# Switch contextkubectx <context-name>
# Switch namespacekubens <namespace>Key Features:
- Fast context switching
- Namespace management
- Interactive selection
Development Tools
Section titled “Development Tools”Skaffold
Section titled “Skaffold”Continuous development for Kubernetes applications.
Installation:
# Linux/macOSbrew install skaffold
# Linux/Windows/macOScurl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64chmod +x skaffoldsudo mv skaffold /usr/local/binKey Features:
- Continuous build, push, and deploy
- File watching and hot reloading
- Multi-environment support
- Integration with CI/CD systems
Kustomize
Section titled “Kustomize”Template-free way to customize Kubernetes configurations.
Installation:
# Built into kubectlkubectl kustomize
# Standalonebrew install kustomizeKey Features:
- Overlay-based configuration management
- Resource patching without templates
- Environment-specific configurations
- Integration with kubectl
Monitoring and Visualization
Section titled “Monitoring and Visualization”Prometheus and Grafana
Section titled “Prometheus and Grafana”Monitoring and visualization stack.
Installation:
# Using Helmhelm repo add prometheus-community https://prometheus-community.github.io/helm-chartshelm install prometheus prometheus-community/prometheushelm install grafana grafana/grafanaKey Features:
- Time-series metrics collection and storage
- Alerting and notification
- Rich visualization dashboards
- Query language for metrics
Kubernetes IDE with rich features.
Installation: Download from Lens website
Key Features:
- Graphical cluster management
- Resource visualization and metrics
- Terminal access and log viewing
- Built-in Prometheus integration
Cluster Management
Section titled “Cluster Management”kubeadm
Section titled “kubeadm”Tool for cluster bootstrapping.
Installation:
apt-get update && apt-get install -y kubeadmKey Features:
- Bootstrap Kubernetes clusters
- Upgrade Kubernetes components
- Add/remove nodes
- Generate certificates and tokens
Production-grade cluster installation, upgrade, management.
Installation:
# Linux/macOSbrew install kopsKey Features:
- Create production-ready clusters on AWS
- Multi-master high availability
- Infrastructure as code
- Rolling updates and upgrades
Rancher
Section titled “Rancher”Complete container management platform.
Installation:
helm repo add rancher-latest https://releases.rancher.com/server-charts/latesthelm install rancher rancher-latest/rancher \ --namespace cattle-system \ --create-namespace \ --set hostname=rancher.example.comKey Features:
- Multi-cluster management
- User management and RBAC
- App catalog and CI/CD
- Monitoring and logging integration
GitOps Tools
Section titled “GitOps Tools”ArgoCD
Section titled “ArgoCD”Declarative GitOps continuous delivery tool.
Installation:
kubectl create namespace argocdkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlKey Features:
- GitOps workflow
- Application state visualization
- Multi-cluster deployment
- SSO integration
GitOps toolkit for Kubernetes.
Installation:
# Using Flux CLIcurl -s https://fluxcd.io/install.sh | sudo bashflux bootstrap github \ --owner=<username> \ --repository=<repository> \ --personalKey Features:
- Automated deployment
- Helm and Kustomize integration
- Notification controller
- Multi-tenancy support
Security Tools
Section titled “Security Tools”Container vulnerability scanner.
Installation:
# Linux/macOSbrew install aquasecurity/trivy/trivy
# apt-based Linuxsudo apt-get install -y trivyUsage:
trivy image nginx:latestKey Features:
- Vulnerability scanning for containers
- Infrastructure as Code scanning
- Integration with CI/CD
- SBOM generation
kube-bench
Section titled “kube-bench”Kubernetes CIS benchmark testing.
Installation:
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yamlKey Features:
- CIS benchmark compliance testing
- Security best practice verification
- Detailed remediation guidance
- CI/CD integration
Network Tools
Section titled “Network Tools”kubeshark
Section titled “kubeshark”API traffic analyzer for Kubernetes.
Installation:
# Linux/macOSbrew tap kubeshark/kubesharkbrew install kubeshark
# Script installsh <(curl -Ls https://kubeshark.co/install)Key Features:
- Real-time API traffic visualization
- Protocol-level inspection
- Traffic replay and testing
- Service map visualization
Cilium
Section titled “Cilium”Advanced networking and security.
Installation:
helm repo add cilium https://helm.cilium.io/helm install cilium cilium/cilium --namespace kube-systemKey Features:
- eBPF-based networking
- Network policy enforcement
- Transparent encryption
- Network performance monitoring
