---
title: "How to debug Kubernetes pods stuck in CrashLoopBackOff status?"  
description: "How to debug Kubernetes pods stuck in CrashLoopBackOff status?"  
author: "Manish Sharma"  
published: 2026-09-19  
canonical: https://answers.mindstick.com/qa/117239/how-to-debug-kubernetes-pods-stuck-in-crashloopbackoff-status  
category: "Kubernetes"  
tags: ["kubernetes", "DevOps", "docker", "kubectl", "troubleshooting"]  
reading_time: 1 minute  

---

# How to debug Kubernetes pods stuck in CrashLoopBackOff status?

After deploying a new microservice container to Kubernetes, the pod enters a state of **CrashLoopBackOff**. The container starts, crashes almost immediately, and restarts in an exponential backoff loop. What systematic troubleshooting commands should be used to diagnose why the container keeps failing?

## Troubleshooting Steps

Run these standard kubectl commands to retrieve logs and event records:

- **kubectl logs:** Fetch recent stdout/stderr output from the failing container
- **kubectl describe pod:** Inspect recent cluster events and exit codes
- **kubectl get events:** View cluster-wide lifecycle events

## Reading Exit Codes

Check the container status details to inspect exit codes:

- **Exit Code 1 or 127:** Application error or missing executable script
- **Exit Code 137:** Container was terminated by OOMKilled (Out of Memory)
- **Exit Code 139:** Segmentation fault within the application code


---

Original Source: https://answers.mindstick.com/qa/117239/how-to-debug-kubernetes-pods-stuck-in-crashloopbackoff-status

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
