kubectl get pods is one line per Pod. kubectl describe pod is one page per Pod.
text
learner@shallows:~$ kubectl describe pod old
Name: old
Namespace: default
Node: shallows-node-1/10.0.0.10
Status: Pending
IP: 10.42.0.9
Containers:
old:
Image: nginx:1.99-nope
State: Waiting
Reason: ImagePullBackOff
Restart Count: 0
Events:
Type Reason Age From Message
---- ------ --- ---- -------
Normal Pulling 3s (x2 over 16s) kubelet Pulling image "nginx:1.99-nope"
Warning Failed 2s (x2 over 15s) kubelet Failed to pull image "nginx:1.99-nope": ... not foundWhat to read
| Section | Tells you |
|---|---|
Containers | Each container's Image, its State (Waiting, Running, Terminated) and the Reason |
Last State | How the container ended the last time, with its exit code |
Events | What the cluster did to this Pod, in order, with the exact error text |
Events are the part you will read most. They are a timeline: scheduled, pulling, pulled, started, failed. x2 over 15s means the same thing happened twice in 15 seconds. The newest line is at the bottom.
Fix an image in place
A Pod made by kubectl run has one container, with the same name as the Pod. You can swap its image without deleting the Pod:
text
learner@shallows:~$ kubectl set image pod/old old=nginx:1.27
pod/old image updatedpod/oldthe objectoldcontainer name=nginx:1.27new image
The image is almost the only part of a Pod you can change after it exists. For everything else, you delete the Pod and make a new one.