VISI

kubectl cheat sheet

kubectl get nodes -o wide
kubectl get pods -A
kubectl describe pod <name>
kubectl logs <pod> && kubectl logs <pod> --previous
kubectl exec -it <pod> -- bash
kubectl apply -f manifest.yaml
kubectl scale deployment <name> --replicas=3
kubectl top nodes && kubectl top pods
kubectl get events --sort-by='.lastTimestamp'

Quiz

A few quick questions based on this unit. Mark it complete when you are done.

Question 1 / 3

What is kubectl get events --sort?