Kubernetes Tooling
Most of our infrastructure runs on Kubernetes. Here’s how to get your local tooling sorted.
kubectl
The Kubernetes CLI. Install it via Homebrew:
brew install kubectl
Verify it works:
kubectl version --client
Kubeconfig
Your kubeconfig file (~/.kube/config) tells kubectl how to connect to clusters. You’ll receive cluster credentials from a team lead.
Once you have them, verify access:
kubectl cluster-info
kubectl get nodes
Multiple Clusters
If you work across multiple clusters, keep configs separate and merge them:
export KUBECONFIG=~/.kube/config:~/.kube/staging:~/.kube/production
Switch between contexts:
kubectl config use-context staging
kubectl config use-context production
krew - Plugin Manager
krew lets you install kubectl plugins. Install it:
brew install krew
Add to your shell config:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
Useful plugins:
kubectl krew install ctx # fast context switching
kubectl krew install ns # fast namespace switching
kubectl krew install neat # clean up YAML output
kubectl krew install tree # show object hierarchy
kubectl krew install whoami # show current user/permissions
stern - Log Tailing
stern tails logs across multiple pods at once. You’ll use this constantly:
brew install stern
Usage:
# Tail all pods matching "api" in current namespace
stern api
# Tail specific container across pods
stern api -c nginx
# Tail with timestamps
stern api -t
# Tail across all namespaces
stern api --all-namespaces
# Tail only the last 10 lines
stern api --tail 10
k9s - Terminal UI
k9s gives you a terminal dashboard for Kubernetes:
brew install k9s
Launch it:
k9s # current context
k9s --context staging # specific context
k9s -n kube-system # specific namespace
Key shortcuts in k9s:
:pods- view pods:svc- view services:deploy- view deploymentsl- view logss- shell into containerd- describe resourcectrl+d- delete resource
Lens (Optional)
If you prefer a GUI, Lens is a desktop app for managing clusters. It’s not required but some people find it useful for visualising resources.
Next Steps
Continue to Cloud & Infrastructure to set up your AWS access and infrastructure tools.