☸️
DevOps
Kubectl Cheat Sheet
Common kubectl commands quick reference
kubectl get pods -AAll pods in all namespaces
kubectl describe pod <name>Pod events and status
kubectl logs <pod> -fStream pod logs
kubectl apply -f .Apply manifests in folder
kubectl delete -f deployment.ymlDelete resources from file
kubectl exec -it <pod> -- /bin/shShell into pod
kubectl port-forward svc/<name> 8080:80Forward local port to service
kubectl get events --sort-by=.lastTimestampRecent cluster events
kubectl rollout restart deployment/<name>Restart deployment
kubectl top podsPod CPU/memory usage