Read the signals of two failing pods
- 12 min
- 6 steps
- Pods and workloads
Steps
0 of 6 done
Two pods restart in a loop for different reasons. Tell phase from status, read the previous run's logs and the last exit code, then replace the pod you can fix.
Step 1 of 6
kubectl get podsshowsapiinCrashLoopBackOff. Print the pod's actual phase.Checked against what your commands print.
Step 2, not started: Read the output of the
apicontainer's last crashed run and find what it is missing.Step 3, not started: The
thumbspod restarts too. Find the reason and the exit code of its last terminated run.Step 4, not started: Environment variables cannot be changed on a running pod. Remove the
apipod so you can create a corrected one.Step 5, not started: Create a pod named
apifrom the imageghcr.io/kx-labs/ledger:1.0withLEDGER_DBset topostgres://ledger-db:5432/ledger, and wait until it is ready.Step 6, not started: Print only the status of the
Readycondition of the recreatedapipod.
Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.