kubectl logs POD prints everything the container wrote since it started. In an incident that is rarely what you want.
The last few lines
kubectl logs market-api-7b6c-x2k4p --tail=20
kubectl logs market-api-7b6c-x2k4p --since=10m
kubectl logs market-api-7b6c-x2k4p -f--tail counts lines from the end, --since takes a duration, -f keeps the stream open. --timestamps prefixes each line with the time the container wrote it, which is how you line logs up with events.
The crash before this one
kubectl logs market-api-7b6c-x2k4p --previousEvery restart starts a new log. The current one may be empty or healthy-looking because the container just came back. --previous shows the output of the container that died, and that is where the stack trace is.
Every replica at once
kubectl logs -l app=market-api --prefix --tail=5[pod/market-api-7b6c-x2k4p/api] 2026-10-19T09:00:12Z INFO listening on :8080
[pod/market-api-7b6c-q8r1z/api] 2026-10-19T09:00:12Z INFO listening on :8080A label selector picks several Pods; --prefix tags each line with its Pod and container. kubectl logs deploy/market-api is different: it picks one Pod of the Deployment and says so.
Which container
Multi-container Pods need -c NAME, or --all-containers for everything. Init containers have logs too, reachable with -c while they run or after they fail.
What is not in the logs
Logs hold what the process printed to stdout and stderr, nothing else. Why a container was killed, why a Pod was not scheduled, why an image did not pull: those are Events. A log that ends mid-sentence with no error is the shape of an OOMKilled.