Interview Prep/Kubernetes/Observability & Day-2 Operations

What is the difference between `kubectl logs --previous` and `kubectl logs -f`?

BeginnerProductionObservability & Day-2 Operations
Answer

--previous prints logs from the last terminated instance of the container (essential for CrashLoopBackOff), -f streams the current instance. Use --since, --tail, -c for containers, and -l app=web --prefix to read many Pods.

kubectl logs -l app=web --prefix --since=15m --max-log-requests=20
All Kubernetes questions

More on Observability & Day-2 Operations