DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk5 min

How to Find the Cause of a Kubernetes Pod Failure

A practical Kubernetes Pod triage sequence for Pending, restarting, and running-but-unhealthy workloads, with commands and guidance on logs, exec, debug containers, Services, and nodes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with the Pod’s namespace, status, container states, restart counts, and recent events; then follow the evidence to the right container or Kubernetes layer. A Pod that is Pending needs a different investigation from one that is restarting or running but unreachable.

Start with scope, status, and events

First establish which namespace, workload, Pod, and container are affected. If the workload has multiple replicas, compare a failing Pod with a healthy one: a single failure suggests a different scope from a symptom shared across replicas.

As an Amazon Associate I earn from qualifying purchases.

kubectl get pods -n <namespace>
kubectl describe pod <pod> -n <namespace>
kubectl get events -n <namespace>

kubectl describe pod shows the Pod’s details and recent events. Check its current state, conditions, container states, restart counts, and event messages before changing a manifest. Events are namespace-scoped, so query the namespace where the Pod lives. A FailedScheduling event may identify a placement or resource problem; use the actual message rather than assuming insufficient capacity is the cause. See Kubernetes’ Pod debugging guide.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

My Pod stays Pending

A Pending Pod has not reached the point where inspecting application logs is usually the first useful step. Read the scheduling events in its description and check the resource and placement clues they provide. Address the reported constraint, then observe whether the Pod is scheduled; do not guess at a manifest change from the status alone. Kubernetes’ debugging guide includes insufficient resources as an example of a scheduling explanation, not an exhaustive list of causes.

Debug a Pod that keeps restarting

For CrashLoopBackOff or other repeated restarts, identify the affected container and inspect both its current output and, when available, the output from its previous instance. A container that has already crashed may not remain available long enough for an interactive shell.

kubectl logs <pod> -c <container> -n <namespace>
kubectl logs <pod> -c <container> --previous -n <namespace>
kubectl describe pod <pod> -n <namespace>

The --previous option requests logs from the previous instance of the container. Read them alongside the container’s exit details and startup configuration; logs can show what happened before termination, while the Pod description supplies state and event context. For command options, see the Kubernetes kubectl logs reference.

Check init containers separately

If initialization is the part that is not completing, inspect the init container’s own state and logs by its container name. An application container’s logs may not explain a Pod blocked during initialization. Kubernetes maintains a separate init-container troubleshooting guide.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Debug a running Pod that is not ready or serving

For a running but unhealthy Pod, inspect the relevant container’s logs and probe status, then test the application and its dependencies from a context suited to the failure. A running state alone does not establish that the application is ready or that clients can reach it. Kubernetes’ Debug Running Pods guide covers investigation within a running Pod.

If the application responds from within the Pod but clients cannot access it, investigate the Service path rather than treating every connectivity failure as a Pod fault. Check whether the Service selects the intended Pods, whether it has the expected endpoints, and whether in-cluster connectivity works. Follow the Kubernetes Service debugging guide.

Choose the right inspection method

Method Best fit Important limit
kubectl logs Inspect output from a container, including a previous instance after a crash. Specify the container when the Pod has more than one; previous-instance output is available only when there is a previous instance.
kubectl exec Run a command inside a running container that contains the needed shell or utility. It cannot help if the container is not running, and minimal or distroless images may have no shell or troubleshooting tools.
Ephemeral container with kubectl debug Temporarily inspect a running Pod when exec is insufficient or the workload image lacks utilities. Requires suitable cluster/runtime support and deliberate choices about debug image, process targeting, and permissions.
Debug copy of a Pod Investigate with a modified copy when altering the original Pod is not the desired approach. It is a separate Pod; clean it up when finished.
Node debug Pod Investigate a problem that points to the node rather than an individual application container. Advanced node diagnosis may require node identification and shell access.

Use exec only when the container can support it

For a running container with the required tools, run a targeted command rather than assuming every image includes a shell:

kubectl exec -it <pod> -c <container> -n <namespace> -- sh

The command fails if the container is not running or its image does not contain sh. In that case, use logs or a suitable debug method instead. The Kubernetes running-Pod guide explains the available approaches.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use kubectl debug when exec is insufficient

Kubernetes describes ephemeral containers as useful for interactive troubleshooting when a container has crashed or its image does not include debugging utilities. The feature has been stable since Kubernetes v1.25. An ephemeral container is user-initiated, is not automatically restarted, and cannot be changed or removed after it has been added to the Pod.

kubectl debug -it <pod> -n <namespace> --image=busybox

This is a starting example, not a universal command: the task may require a target container, another profile, or a copied Pod, and cluster policy or runtime support may constrain the options. In particular, whether a debug container can see a target process namespace depends in part on runtime support. Verify flags against the installed kubectl version and the cluster’s policy. See the Kubernetes running-Pod guidance, Ephemeral Containers documentation, and kubectl debug reference.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep debug permissions and cleanup deliberate

An ephemeral container runs in the Pod’s context, so choose an image and security profile appropriate to the investigation and the cluster’s requirements. Documented profiles include general, baseline, restricted, netadmin, and sysadmin. Capabilities requested by a profile may not work when the target Pod runs as non-root. The sysadmin profile can grant privileged capabilities, so do not use it as the default. Review the kubectl debug reference before choosing options. Remove copied debug Pods when the investigation is complete; an ephemeral container itself cannot be removed from the Pod after it is added.

When the problem belongs to the node or cluster

If the evidence points beyond one Pod—for example, symptoms affect multiple workloads or implicate node health—move to cluster-level troubleshooting rather than continuing to treat the problem as an application-container fault. Some advanced Pod investigations require identifying the node and gaining shell access. Kubernetes separates application and cluster investigation in its Monitoring, Logging, and Debugging overview; check the known issues for the Kubernetes release running in your environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Kubernetes does not provide native storage for logs. If logs must remain available after containers or Pods are gone, retention and centralized collection require a separate logging solution. The Kubernetes logging architecture documentation describes this distinction.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.