Jeff
Jeff Cloud Systems Architect
1 min read

Kubectl Cheatsheet

Kubectl Cheatsheet

Just a small list of kubectl commands that I always forget. This is a living list, so feel free to add any comments below.

Resource Utilization

# Show node resource usage
kubectl top nodes

# Show pod resource usage
kubectl top pods

Others

# Restart a deployment named web
kubectl rollout restart deployment/web

# Get pod logs by label
kubectl logs -l app=web

# Change working namespace from default
kubectl config set-context --current --namespace=web