Chapter 15: Kubernetes Introduction
15.4 kubectl everyday verbs
kubectl get pods -A
kubectl get deploy,svc -n default
kubectl describe pod <name>
kubectl logs <pod> -f
kubectl apply -f app.yaml
kubectl delete -f app.yaml
kubectl get events --sort-by=.lastTimestamp
| Verb | Use |
|---|---|
get |
List resources |
describe |
Why is this Pending/CrashLoop? |
logs |
Container stdout (same idea as docker logs) |
apply |
Declarative create/update from YAML |
delete |
Remove resources |
What you see on failure: describe Events often tell ImagePullBackOff, CrashLoopBackOff, or FailedScheduling — read Events before rewriting half the YAML.
Ravindra Bagale's Tip
CrashLoopBackOff = container start hotay ani crash. kubectl logs + describe — guess nako. Bilkul visru naka!