In part 20 you read 403 messages as who, what, which and where. This part applies the same habit to the Pod failures you will meet most often. You will create six Pods that each fail in a different way, read what Kubernetes tells you about each one, and fix them. By the end you will have one routine that works for all six: read the status, go to the one place it points to, read the message, fix. You need the kind cluster from part 3 and the k8s-from-zero namespace from part 4. We tested every step on kind v0.33.0 (node image v1.37.0) with kubectl v1.37.2.
What you will build
Six small Pods, one per failure: pending, typo, config, runerr, crash and oom. Each is a few lines of YAML with one mistake. The decision tree below is the map for the whole part: each STATUS value leads to one command and one kind of fix.
Four commands show you everything
The Debug Pods guide starts where you should: look at the Pod’s state and recent events. Four commands cover it, from the summary to the detail:
kubectl get podsgives theSTATUSandRESTARTScolumns.STATUSshows the most useful single word: the phase (Pending,Running), or the reason a container is waiting (ImagePullBackOff) or last stopped (OOMKilled,Error).kubectl describe pod NAMEgives each container’sStateandLast Statewith reason, exit code and message, and the Events for this Pod at the bottom.kubectl logs NAMEprints what the container wrote to standard output and standard error.--previousprints the run before the current one (kubectl logs).kubectl eventslists events in time order;--for pod/NAMEnarrows it to one object and--types=Warningto problems (kubectl events).
Two places hold the cause more often than any other. Events explain problems that happen before a container exists: scheduling and image pulls. A container’s Last State explains why it stopped: an exit code, a reason such as OOMKilled or StartError, and sometimes a message. An app can also write a short final message to /dev/termination-log, the default terminationMessagePath, and Kubernetes shows it there too (Determine the Reason for Pod Failure).
Restarts slow down on purpose
Three of the six failures make the container exit, and the kubelet restarts it (the default restartPolicy is Always). It does not retry at once forever. It waits 10 seconds, then 20, 40 and so on, doubling up to a cap of 300 seconds, and it resets the delay once a container has run for 10 minutes without trouble (Pod Lifecycle). While it waits, the container is in the CrashLoopBackOff state. Image pulls work the same way: ImagePullBackOff means the kubelet keeps trying with a growing delay, capped at 300 seconds (Images).
So a crash loop is any exit, repeated, with the kubelet waiting longer each time. The cause is always in the logs or in Last State. A slower retry also means a fix can take a few minutes to show if you only change something outside the Pod; deleting and recreating the Pod starts it fresh.
Try it: break six Pods, then fix them
- Save the six manifests. Each comment marks the mistake.
pending.yaml asks for more CPU than the node has:
apiVersion: v1
kind: Pod
metadata:
name: pending
namespace: k8s-from-zero
spec:
containers:
- name: app
image: busybox:1.37
command: ["sleep", "3600"]
resources:
requests:
cpu: "64" # more CPU than the node has
typo.yaml has a typo in the image tag:
apiVersion: v1
kind: Pod
metadata:
name: typo
namespace: k8s-from-zero
spec:
containers:
- name: web
image: nginx:1.29-alpnie # typo: should be 1.29-alpine
config.yaml reads an environment variable from a ConfigMap that does not exist (ConfigMaps were part 9):
apiVersion: v1
kind: Pod
metadata:
name: config
namespace: k8s-from-zero
spec:
containers:
- name: app
image: busybox:1.37
command: ["sh", "-c", "echo mode=$MODE; sleep 3600"]
env:
- name: MODE
valueFrom:
configMapKeyRef:
name: app-config
key: mode
runerr.yaml runs a command that is not in the image:
apiVersion: v1
kind: Pod
metadata:
name: runerr
namespace: k8s-from-zero
spec:
containers:
- name: app
image: busybox:1.37
command: ["/app/start.sh"] # this file does not exist in the image
crash.yaml starts, prints an error after five seconds and exits with code 1, like an app that cannot find its config file:
apiVersion: v1
kind: Pod
metadata:
name: crash
namespace: k8s-from-zero
spec:
containers:
- name: app
image: busybox:1.37
command: ["sh", "-c", "echo starting; sleep 5; echo 'error: /etc/app/app.conf not found' >&2; exit 1"]
oom.yaml fills memory until it passes its 32 MiB limit (limits were part 11):
apiVersion: v1
kind: Pod
metadata:
name: oom
namespace: k8s-from-zero
spec:
containers:
- name: app
image: busybox:1.37
command: ["sh", "-c", "echo filling memory; tail /dev/zero"]
resources:
limits:
memory: "32Mi"
- Apply them all and wait about a minute:
kubectl apply -f pending.yaml -f typo.yaml -f config.yaml -f runerr.yaml -f crash.yaml -f oom.yaml
kubectl get pods -n k8s-from-zeroExplain this command
kubectl apply -f pending.yaml -f typo.yaml -f config.yaml -f runerr.yaml -f crash.yaml -f oom.yaml
kubectl get pods -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.applyApply a configuration to a resource by file name or stdin. The apply docs say the resource is created if it does not exist yet. JSON and YAML are accepted.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.pending.yamlThe file named by --filename. apply creates the objects or updates them to match this file.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.typo.yamlThe file named by --filename. apply creates the objects or updates them to match this file.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.config.yamlThe file named by --filename. apply creates the objects or updates them to match this file.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.runerr.yamlThe file named by --filename. apply creates the objects or updates them to match this file.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.crash.yamlThe file named by --filename. apply creates the objects or updates them to match this file.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.oom.yamlThe file named by --filename. apply creates the objects or updates them to match this file.
Explain this command
kubectl apply -f pending.yaml -f typo.yaml -f config.yaml -f runerr.yaml -f crash.yaml -f oom.yaml
kubectl get pods -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.getDisplay one or many resources. kubectl get prints a table of the most important information about the resources you name.podsThe resource type to display. kubectl get points you to kubectl api-resources for the full list of types the server supports.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
NAME READY STATUS RESTARTS AGE
config 0/1 CreateContainerConfigError 0 45s
crash 0/1 Error 3 (30s ago) 45s
oom 0/1 OOMKilled 3 (33s ago) 45s
pending 0/1 Pending 0 45s
runerr 0/1 RunContainerError 3 (9s ago) 45s
typo 0/1 ImagePullBackOff 0 45s
Six different words. A custom-columns view puts the phase, the waiting reason and the last exit side by side:
kubectl get pods -n k8s-from-zero -o custom-columns='NAME:.metadata.name,PHASE:.status.phase,WAITING:.status.containerStatuses[0].state.waiting.reason,LAST-EXIT:.status.containerStatuses[0].lastState.terminated.reason,CODE:.status.containerStatuses[0].lastState.terminated.exitCode'Explain this command
kubectl get pods -n k8s-from-zero -o custom-columns='NAME:.metadata.name,PHASE:.status.phase,WAITING:.status.containerStatuses[0].state.waiting.reason,LAST-EXIT:.status.containerStatuses[0].lastState.terminated.reason,CODE:.status.containerStatuses[0].lastState.terminated.exitCode'kubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.getDisplay one or many resources. kubectl get prints a table of the most important information about the resources you name.podsThe resource type to display. kubectl get points you to kubectl api-resources for the full list of types the server supports.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.-oShort form of --output. It selects the output format. For get, the formats include json, yaml, name, jsonpath, custom-columns and wide.custom-columns='NAME:.metadata.name,PHASE:.status.phase,WAITING:.status.containerStatuses[0].state.waiting.reason,LAST-EXIT:.status.containerStatuses[0].lastState.terminated.reason,CODE:.status.containerStatuses[0].lastState.terminated.exitCode'A custom table. custom-columns is an output format. The get examples write each column as a heading, a colon, and a JSONPath.
NAME PHASE WAITING LAST-EXIT CODE
config Pending CreateContainerConfigError <none> <none>
crash Running <none> Error 1
oom Running <none> OOMKilled 137
pending Pending <none> <none> <none>
runerr Running RunContainerError StartError 128
typo Pending ImagePullBackOff <none> <none>
Three Pods never started a container, so their phase is Pending. The other three are Running in phase even though nothing works, because the Pod is still trying. The phase alone tells you little; the reasons tell you a lot.
pending: read the scheduler’s event.
kubectl describe pod pending -n k8s-from-zeroExplain this command
kubectl describe pod pending -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.describeShow details of a specific resource or group of resources. The describe docs say this includes related resources such as events or controllers.podThe resource type.pendingThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 52s default-scheduler 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
No node has 64 free CPUs, and evicting lower-priority Pods would not help. The simple fix is to edit pending.yaml to cpu: "100m" and replace the Pod. replace --force deletes it and creates it again:
kubectl replace --force -f pending.yamlExplain this command
kubectl replace --force -f pending.yamlkubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.replaceReplace a resource by file name or stdin. The replace docs say the complete resource spec must be provided when replacing an existing resource.--forceWith replace, delete the object and create it again from the file. The replace docs list this as force replace: delete and then re-create the resource.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.pending.yamlThe file named by --filename. apply creates the objects or updates them to match this file.
pod "pending" deleted from k8s-from-zero namespace
pod/pending replaced
The same event tells you about the other scheduling blockers: a nodeSelector no node matches, or taints the Pod does not tolerate.
typo: read the pull error.
kubectl events -n k8s-from-zero --for pod/typoExplain this command
kubectl events -n k8s-from-zero --for pod/typokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.eventsDisplay events. The events docs say it can list them for a namespace or only those that pertain to one resource.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.--forWith kubectl events, limit the list to events about this object.pod/typoThe resource written as type/name: pod/typo.
LAST SEEN TYPE REASON OBJECT MESSAGE
52s Normal Scheduled Pod/typo Successfully assigned k8s-from-zero/typo to k8s-ep19-control-plane
25s (x2 over 51s) Normal BackOff Pod/typo Back-off pulling image "nginx:1.29-alpnie"
25s (x2 over 51s) Warning Failed Pod/typo Error: ImagePullBackOff
10s (x3 over 51s) Normal Pulling Pod/typo Pulling image "nginx:1.29-alpnie"
10s (x3 over 51s) Warning Failed Pod/typo Failed to pull image "nginx:1.29-alpnie": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/nginx:1.29-alpnie": failed to resolve reference "docker.io/library/nginx:1.29-alpnie": docker.io/library/nginx:1.29-alpnie: not found
10s (x3 over 51s) Warning Failed Pod/typo Error: ErrImagePull
ErrImagePull is the failed attempt; ImagePullBackOff is the wait before the next one. The message ends in not found: the registry answered, and that tag does not exist. Other endings point elsewhere: an authentication error means the registry needs credentials (imagePullSecrets), and a timeout or DNS error means the node cannot reach the registry. You can change a Pod’s image in place:
kubectl set image pod/typo web=nginx:1.29-alpine -n k8s-from-zeroExplain this command
kubectl set image pod/typo web=nginx:1.29-alpine -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.setThe command group for setting fields on existing objects, such as image, resources or selector.imageThe set image subcommand. It updates the container image on a pod, deployment or other workload.pod/typoThe resource written as type/name: pod/typo.web=nginx:1.29-alpineCONTAINER=IMAGE: set the container named web to the image nginx:1.29-alpine.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
pod/typo image updated
config: read the missing reference.
kubectl describe pod config -n k8s-from-zeroExplain this command
kubectl describe pod config -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.describeShow details of a specific resource or group of resources. The describe docs say this includes related resources such as events or controllers.podThe resource type.configThe object name: the Pod called config.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4m2s default-scheduler Successfully assigned k8s-from-zero/config to k8s-ep19-control-plane
Normal Pulled 1s (x21 over 4m1s) kubelet spec.containers{app}: Container image "busybox:1.37" already present on machine and can be accessed by the pod
Warning Failed 1s (x21 over 4m1s) kubelet spec.containers{app}: Error: configmap "app-config" not found
The kubelet cannot build the container’s environment, so it never creates the container, and it keeps checking. Create what is missing and the Pod starts by itself:
kubectl create configmap app-config -n k8s-from-zero --from-literal=mode=prod
kubectl logs config -n k8s-from-zeroExplain this command
kubectl create configmap app-config -n k8s-from-zero --from-literal=mode=prod
kubectl logs config -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.createCreate a resource from a file or from stdin. Here it takes the subcommand that follows.configmapThe resource type.app-configThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.--from-literal=mode=prodAdd one key and value to the ConfigMap: the key mode with the value prod.
Explain this command
kubectl create configmap app-config -n k8s-from-zero --from-literal=mode=prod
kubectl logs config -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.logsPrint the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.configThe object name: the Pod called config.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
configmap/app-config created
mode=prod
A missing Secret, or a key that is not in the ConfigMap or Secret, gives the same status with its own message.
runerr: read the Last State message.
kubectl describe pod runerr -n k8s-from-zeroExplain this command
kubectl describe pod runerr -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.describeShow details of a specific resource or group of resources. The describe docs say this includes related resources such as events or controllers.podThe resource type.runerrThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
...
Command:
/app/start.sh
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: StartError
Message: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/app/start.sh": stat /app/start.sh: no such file or directory
Exit Code: 128
...
The container was created, but the runtime could not start its command, so your app never ran and there are no logs to read. The message names the file. (The Started time in this block shows 1 January 1970, the zero timestamp, because the process never started.) Fix the command in runerr.yaml, here to ["sleep", "3600"], and replace the Pod:
kubectl replace --force -f runerr.yamlExplain this command
kubectl replace --force -f runerr.yamlkubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.replaceReplace a resource by file name or stdin. The replace docs say the complete resource spec must be provided when replacing an existing resource.--forceWith replace, delete the object and create it again from the file. The replace docs list this as force replace: delete and then re-create the resource.-fShort form of --filename. The file, directory or URL that contains the configuration to apply.runerr.yamlThe file named by --filename. apply creates the objects or updates them to match this file.
pod "runerr" deleted from k8s-from-zero namespace
pod/runerr replaced
crash: read the logs, including the run before.
Wait until the Pod shows Running again between crashes, then ask for the previous run:
kubectl get pod crash -n k8s-from-zero
kubectl logs crash -n k8s-from-zero --previousExplain this command
kubectl get pod crash -n k8s-from-zero
kubectl logs crash -n k8s-from-zero --previouskubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.getDisplay one or many resources. kubectl get prints a table of the most important information about the resources you name.podThe resource type to display. kubectl get points you to kubectl api-resources for the full list of types the server supports.crashThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
Explain this command
kubectl get pod crash -n k8s-from-zero
kubectl logs crash -n k8s-from-zero --previouskubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.logsPrint the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.crashThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.--previousWith logs, print the logs of the previous instance of the container, the one that crashed. The logs docs say it does this if that instance exists.
NAME READY STATUS RESTARTS AGE
crash 1/1 Running 4 (44s ago) 102s
starting
error: /etc/app/app.conf not found
describe shows the same exit in numbers:
Last State: Terminated
Reason: Error
Exit Code: 1
Error with a non-zero exit code means your app ran and chose to exit. Kubernetes cannot fix that; the log line tells you what to fix, here a missing config file, which you would mount from a ConfigMap. One trap we hit on the box: while the Pod showed Error, the newest container had already exited, and kubectl logs crash --previous answered unable to retrieve container logs for containerd://... because the run before it was already cleaned up. Plain kubectl logs crash showed the crashed run’s output instead. If one of the two commands comes back empty, try the other.
oom: read the reason and the limit.
kubectl describe pod oom -n k8s-from-zeroExplain this command
kubectl describe pod oom -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.describeShow details of a specific resource or group of resources. The describe docs say this includes related resources such as events or controllers.podThe resource type.oomThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
...
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
...
Limits:
memory: 32Mi
Requests:
memory: 32Mi
...
A container that keeps using more memory than its limit is terminated, and the reason is OOMKilled (Assign Memory Resources). The app gets no chance to write an error first, so do not expect one in its log. Either the limit is too low for what the app really needs, or the app uses more and more memory. Measure, then raise the limit or fix the leak. Here the app is built to fill memory, so leave it broken.
- Check the result and clean up:
kubectl get pods -n k8s-from-zeroExplain this command
kubectl get pods -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.getDisplay one or many resources. kubectl get prints a table of the most important information about the resources you name.podsThe resource type to display. kubectl get points you to kubectl api-resources for the full list of types the server supports.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
NAME READY STATUS RESTARTS AGE
config 1/1 Running 0 4m41s
crash 0/1 Error 4 (83s ago) 2m21s
oom 0/1 CrashLoopBackOff 5 (114s ago) 4m41s
pending 1/1 Running 0 28s
runerr 1/1 Running 0 26s
typo 1/1 Running 0 4m41s
Four fixed; crash and oom are broken by design.
kubectl delete pod pending crash typo oom config runerr -n k8s-from-zero --grace-period=1
kubectl delete configmap app-config -n k8s-from-zeroExplain this command
kubectl delete pod pending crash typo oom config runerr -n k8s-from-zero --grace-period=1
kubectl delete configmap app-config -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.deleteDelete resources by file names, stdin, resources and names, or by resources and label selector.podThe resource type.pendingThe object name.crashThe object name.typoThe object name.oomThe object name.configThe object name: the Pod called config.runerrThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.--grace-period=1Period of time in seconds given to the resource to terminate gracefully. This command passes 1.
Explain this command
kubectl delete pod pending crash typo oom config runerr -n k8s-from-zero --grace-period=1
kubectl delete configmap app-config -n k8s-from-zerokubectlThe Kubernetes command-line client. Subcommands and flags are documented under kubernetes.io/docs/reference/kubectl/.deleteDelete resources by file names, stdin, resources and names, or by resources and label selector.configmapThe resource type.app-configThe object name.-nShort form of --namespace. If present, the namespace scope for this CLI request.k8s-from-zeroThe namespace name.
When it goes wrong
-
You fixed the problem and the Pod still shows the old error. A Pod in back-off waits up to five minutes before the next try. Check the RESTARTS column and the latest event time with
kubectl events --for pod/NAME. For fields you cannot change in place,kubectl replace --force -f file.yamlstarts it fresh. For Pods owned by a Deployment, fix the Deployment, not the Pod: new Pods are made from the Deployment’s template. -
kubectl logssaysunable to retrieve container logs. Covered in step 7: the run you asked for is gone. Try without--previous, or wait until the container runs again. If the container never started (CreateContainerConfigError,StartError), there are no logs at all; readdescribeinstead. -
All six look fine in
get podsbut the app still fails.Runningand1/1only mean the container runs and its readiness probe passes. Requests that fail on the way in are a Service or routing problem. Part 22 covers Services with no endpoints, DNS failures and stuck deletions. -
Too many events to read.
kubectl events -n k8s-from-zero --types=Warningkeeps only the problems, in time order. In our lab its last eight lines named every Pod that had failed, each with its message, which is a quick inventory of a namespace in trouble.
Cheat sheet
| Task | Command or field | Note |
|---|---|---|
| First look | kubectl get pods -n NS |
read STATUS and RESTARTS |
| Reasons side by side | kubectl get pods -o custom-columns=...state.waiting.reason... |
see step 2 |
| Container state and events | kubectl describe pod NAME |
State, Last State, Events |
| Events for one Pod | kubectl events --for pod/NAME |
time order |
| Only warnings | kubectl events -n NS --types=Warning |
quick inventory |
| App output | kubectl logs NAME |
current or last run |
| Output of the run before | kubectl logs NAME --previous |
needs that run to still exist |
Pending |
FailedScheduling event | requests, nodeSelector, taints |
ErrImagePull / ImagePullBackOff |
Failed event message | not found, auth, network |
CreateContainerConfigError |
describe: missing ConfigMap or Secret | create it, the Pod starts |
RunContainerError |
Last State: StartError, message | command or file not in image |
Error / CrashLoopBackOff |
logs, exit code | the app exited |
OOMKilled |
exit code 137 | raise the limit or fix the leak |
| Fix an image in place | kubectl set image pod/NAME c=image:tag |
most other fields need a new Pod |
| Recreate a Pod from a file | kubectl replace --force -f pod.yaml |
delete and create |
Recap and what is next
- Read
STATUSfirst. Each value points to one place: Events for scheduling and pulls,Last Statefor config, start and memory failures, logs for app crashes. - Three failures happen before your app runs (
Pending, image pulls, missing config); three after (start errors, crashes, OOM kills). Only a crash leaves the app’s own error in the logs. - The kubelet retries with growing delays up to five minutes, so a crash loop is any exit, repeated; the cause is in the logs or
Last State. - Most fixes need a new Pod. Fix the manifest, or the Deployment that owns the Pod, and let it be replaced.
Command explanations and quoted passages in this lesson come from or adapt the kubectl reference and the Kubernetes documentation, © The Kubernetes Authors, licensed under CC BY 4.0. We shortened and edited some passages. Kubernetes® is a registered trademark of The Linux Foundation. aitamer.news is not affiliated with or endorsed by The Linux Foundation or the CNCF.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment