Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A zero exit code means one process run finished without error. It does not tell the platform to leave the container alone. If the restart policy says to restart after any termination, a container that exits cleanly every time will be started again, and the restart count keeps climbing. A count of 39,352 with only exit code 0 on record is consistent with that pattern. The title does not name the platform, though, so the mechanics below use Kubernetes and Docker as the two most common examples, and the final section explains what the count alone cannot show.
What exit code 0 does and does not mean
An exit code is the status a process returns when it stops. Code 0 means the process ended without an error from its own point of view. It says nothing about whether the container should keep running. That decision belongs to whatever supervises the container, such as the kubelet in Kubernetes or the Docker daemon, and that supervisor applies a restart policy.
So the two facts can both be true at once: the process succeeded on every run, and the supervisor restarted it tens of thousands of times. A command that finishes its work in a second, under a policy that treats every stop as a reason to start again, produces exactly this loop.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Restart policy decides whether success triggers a restart
In Kubernetes, the Pod field restartPolicy controls this. The official Kubernetes Pod Lifecycle documentation states that “the restartPolicy for a Pod applies to app containers in the Pod and to regular init containers.” Its comparison table for exit code 0 gives the following behavior:
#1 Best Overall
- Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
- Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
- Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
- Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
- Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
| Pod restartPolicy | Container exits with 0 | Container exits with non-zero code | Typical workload |
|---|---|---|---|
Always (default) |
Restarts | Restarts | Long-running service that should never stop |
OnFailure |
Does not restart | Restarts | Finite task that should retry real errors |
Never |
Does not restart | Does not restart | Task that should run once and be inspected |
The same Pod Lifecycle table also lists sidecar containers, and in its exit-code-0 row a sidecar container is shown as restarting. If a sidecar in your Pod is the one exiting cleanly, the cycle can come from that container rather than the main application.
The key point for this incident is the first row. Under Always, the platform has no concept of a job being finished. Any termination, successful or not, schedules another start.
Rank #2
- Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
- Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
- Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
- Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
- From Sandisk, a brand professional photographers trust to take on assignments.
What CrashLoopBackOff actually signals
Kubernetes reports a container that keeps restarting with the status CrashLoopBackOff. The label describes a delay, not an error code. Kubernetes waits longer before each successive restart of the same container, and the status shows that waiting period is in effect. A container can show CrashLoopBackOff after clean exits, and that is the situation this title describes.
The documented values for Kubernetes are:
- The first restart delay is 10 seconds, and the delay grows exponentially on each repeat (10, 20, 40, 80, 160 seconds).
- The delay is capped at 300 seconds, which is five minutes.
- The kubelet resets the backoff after 10 minutes of uninterrupted successful execution.
These are platform behavior values. At the cap, a container that exits immediately each time can restart about 288 times per day (86,400 seconds divided by 300). The count of 39,352 is far beyond that pace, which means the restarts were not all happening at the capped rate. The record that would explain the timing is the Pod’s event history and the timestamps on each restart, which are covered below. Also note that the backoff resets after 10 minutes of stable running, so a container that stays up briefly and then exits will restart again quickly.
Rank #3
- Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
- 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
- Data Security: Solid state drives S.M.A.R.T. health diagnostics and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
- USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
- Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity
How to confirm the policy in a Kubernetes Pod
Work through these steps in order. Each one narrows the cause before you change anything.
- Read the configured restart policy. Run
kubectl get pod <pod-name> -n <namespace> -o jsonpath='{.spec.restartPolicy}'. If the output isAlways, or the field is empty (which defaults toAlways), any clean exit causes a restart. - Check the controller. Run
kubectl get pod <pod-name> -n <namespace> -o jsonpath='{.metadata.ownerReferences[0].kind}'. A Pod owned by a Deployment is expected to stay running. A Pod owned by a Job is expected to finish. - Read the last termination state. Run
kubectl describe pod <pod-name> -n <namespace>and find the container’s Last State block. It shows the reason, the exit code, and the start and finish timestamps. Confirm that every entry reads exit code 0 with a short run time. - Review recent events. The same
describeoutput ends with an Events section. Look for repeatedPulled,Started, andBackOffentries, and for probe failures that could be stopping the container. - Read the logs from the terminated run. Run
kubectl logs <pod-name> -n <namespace> --previous. The--previousflag returns output from the last instance that stopped, which is the one that exited. Look for the final message the process printed before it finished. - Check the command and its environment. Confirm whether the entrypoint is expected to finish or to stay in the foreground, whether required environment variables and mounted files are present, and whether liveness or startup probes are killing a process that is otherwise healthy.
Once you have the policy and the controller, the right fix follows directly. If a service-style process is exiting after its work is done, the usual cause is a command that runs once and returns, or a process that daemonizes and leaves the foreground. In that case the fix is in the image or the command, not the restart count.
Rank #4
- NEARLY 2X FASTER THAN OUR PREVIOUS GENERATION(8) – move 1,000 high-res photos in under 60 seconds(6) with up to 2000MB/s transfer speeds(2).
- IP65 RATING AND UP TO 3M DROP PROTECTION(3) – protects against spills and drops.
- POCKET-SIZED – fits easily in pockets and small bags.
- SPACE TO OWN YOUR AI CONTENT – speed and capacity to download your high-res clips and photo edits.
- 256-BIT AES ENCRYPTION(4) – helps keep private files secure with password protection.
Docker restart policies compared
If the container runs under Docker rather than Kubernetes, the policy is set with the --restart flag or in the container’s configuration. Docker’s documented values are:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall| Docker policy | Restarts after exit code 0 | Restarts after non-zero exit | Honors a manual stop |
|---|---|---|---|
no (default) |
No | No | Not applicable |
on-failure[:max-retries] |
No | Yes, up to the optional retry limit | Not stated as a separate rule |
always |
Yes | Yes | Restarts whenever the container stops |
unless-stopped |
Yes | Yes | Yes, a manual stop is kept |
Docker applies a restart policy only after the container has started successfully, which Docker defines as running for at least 10 seconds. A container that exits within that window is not treated as a successful start. Check the policy with docker inspect -f '{{.HostConfig.RestartPolicy.Name}} {{.RestartCount}}' <container>, which prints the configured policy and the restart count together. Docker and Kubernetes use different field names and lifecycle details, so do not assume one platform’s settings carry over to the other.
Best Value
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Choosing the right setup for the workload
The restart policy should follow from what the container is supposed to do. The same clean exit is a bug for one workload and the intended result for another.
Finite work: use a Job
A batch script, a migration, or a report generator finishes by design. Run it as a Kubernetes Job rather than as a bare Pod or Deployment. Jobs commonly use OnFailure or Never as the Pod restart policy. The Job’s own backoffLimit field controls how many retries the Job makes after failures. Retries at the Job level and restarts at the Pod level are separate mechanisms, so set both deliberately. A Job that succeeds is marked complete and is not restarted.
Long-running services: keep the process in the foreground
A web server or queue consumer should run its main process in the foreground and keep that process alive. A Deployment with the default Always policy is designed for this case. If such a container exits cleanly, the supervisor restarts it, which is correct behavior for a service that should never stop. The defect is that the process stopped, so the fix belongs in the application or in its startup command.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →What the count and exit code cannot tell you
A restart count and a list of exit codes show that the cycle happened. They do not show why each run ended. Confirming the cause requires:
- The Pod or container manifest, including
restartPolicy, the owning controller, and the exact command and arguments. - The termination reason, exit code, and timestamps for the recent runs, from
kubectl describe podor the equivalent Docker inspection output. - The container logs from the terminated runs, not only the current one.
- The Pod’s event history over the same period, including any probe failures and image pulls.
Until those records are available, any diagnosis of a specific incident remains conditional. The general mechanism described here, a clean exit followed by a policy-driven restart and backoff, is well documented for Kubernetes and Docker. Whether it is what happened to your container depends on the policy and command in place at the time.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

