Inspect state, events and placement
#get summarizes objects; describe expands status and related events. Wide output shows additional placement/network data.
Fragment
Events are time-bounded diagnostic records, not a complete audit log.
Reference
Read image builds, container commands, Compose files and Kubernetes workload configuration.
Docker CLI/Dockerfile, Docker Compose and Kubernetes native YAML/kubectl. These are complementary tools, not interchangeable editions. Commands assume your own disposable local environment; image names, cluster objects and paths are illustrative. Nothing runs from this guide.
get summarizes objects; describe expands status and related events. Wide output shows additional placement/network data.
Fragment
Events are time-bounded diagnostic records, not a complete audit log.
logs targets a container’s captured output. --previous requests the previous terminated instance when available.
Fragment
A crash loop often requires previous-instance logs plus exit status/events. Logs may be rotated or absent.
port-forward connects a local port to a selected workload endpoint while the command runs.
Fragment
This is a local diagnostic path, not a production exposure or end-to-end ingress test.
diff previews the live-versus-desired change. apply submits desired configuration; controllers reconcile it asynchronously.
Fragment
kubectl diff commonly exits 1 when differences exist. Applying successfully does not establish rollout health.
-- separates kubectl options from the command. -c chooses a container in a multi-container Pod; -i/-t provide interactive input and a terminal when needed.
Fragment
Minimal images may contain neither a shell nor familiar utilities. Debug-container workflows have their own permissions and lifecycle.
EndpointSlices describe Service backends and their conditions. Compare the Service selector, Pod labels, ports and readiness when traffic has no expected destination.
Fragment
A populated EndpointSlice is one piece of evidence; routing, policies and application listeners can still fail.
top reports observed CPU/memory use when a metrics provider is installed. describe/status and previous logs provide different evidence about scheduling and container exits.
Fragment
Current low usage does not prove a prior OOM did not occur. Requests, limits and measured usage are different quantities.