Follow pod logs kubectl
Stream logs in real time; add -c <container> for multi-container pods
kubectl logs -f <pod> -n <ns>
more kubectl
all 73 commands →
Logs from previous container
kubectl logs <pod> --previous -n <ns>
Exec into pod
kubectl exec -it <pod> -n <ns> -- bash
Port-forward a service
kubectl port-forward svc/<name> 8080:80 -n <ns>
Watch rollout status
kubectl rollout status deployment/<name> -n <ns>
Rollback deployment
kubectl rollout undo deployment/<name> -n <ns>