Azure Kubernetes Service (AKS) Troubleshooting Guide:
Real Solutions to Common Problems
CrashLoopBackOff at 2am. Pods stuck Pending with no obvious cause. Nodes going NotReady mid-deployment. DNS resolution silently failing in production. Every AKS engineer encounters these — the difference between engineers who panic and engineers who stay calm is knowing the exact sequence of diagnostic commands to run. This guide gives you that sequence, the root cause analysis for each failure mode, and the fix.
3 commands90% of AKS problems are diagnosed with the same three kubectl commands: describe pod, logs --previous, and get events — in that order, every timeExit 137The exit code that tells you everything: container killed by SIGKILL — either the Linux OOM killer (memory limit exceeded) or kubelet after grace period expired5 minThe CrashLoopBackOff ceiling: Kubernetes applies exponential backoff (10s → 20s → 40s → 80s → 160s → 300s) capped at 5 minutes between restarts9 problemsThis guide covers 9 of the most common AKS failure modes — from pod crashes and image pull failures to node pressure, DNS, storage, networking, and ingress issues
CrashLoopBackOff at 2am. Pods stuck Pending with no obvious cause. Nodes going NotReady mid-deployment. DNS resolution silently failing in production. Every AKS engineer encounters these — the difference between engineers who panic and engineers who stay calm is knowing the exact sequence of diagnostic commands to run. This guide gives you that sequence, the root cause analysis for each failure mode, and the fix.
The Golden Three: Diagnostic Commands for Every AKS Problem
Before diving into specific problems, burn these three commands into muscle memory. They diagnose 90% of AKS failures. Run them in this exact order every time something breaks — not because there is anything magic about the sequence, but because each command's output guides what you look for in the next one.
Figure 1 — Universal AKS diagnostic flow: the sequence that identifies root cause for any pod or node failureThese three commands, in this order, resolve 90% of AKS problems. The exit code in describe pod tells you the failure category. The --previous logs tell you the exact error message. Everything else is narrowing down the root cause within that category.The essential AKS diagnostic sequence — bookmark this# STEP 1: Get the lay of the land
kubectl get pods -A -o wide # All namespaces, with node assignment
kubectl get nodes -o wide # Node status and versions
kubectl get events -A --sort-by='.lastTimestamp' | tail -30 # Recent events, newest last
# STEP 2: Describe the problem resource
kubectl describe pod <pod-name> -n <namespace> # Read Events section carefully
kubectl describe node <node-name> # If node-level issue suspected
# STEP 3: Read the crash logs
kubectl logs <pod-name> -n <namespace> --previous # ← last crashed container (KEY)
kubectl logs <pod-name> -n <namespace> --previous --tail=100 # Last 100 lines
kubectl logs <pod-name> -n <namespace> -c <container-name> --previous # Multi-container pod
# BONUS: Resource consumption snapshot
kubectl top pods -n <namespace> # Actual CPU/memory usage
kubectl top nodes # Node-level resource pressureThe 9 Problem RunbooksProblem 1CrashLoopBackOff: Pod Starts, Crashes, RepeatsMost CommonPod LayerWhat you see:
kubectl get pods outputNAME READY STATUS RESTARTS AGE
myapp-7d8f6b9c-xk4mp 0/1 CrashLoopBackOff 8 14mWhat CrashLoopBackOff actually means: The container image pulled successfully. The container started. Then it crashed with a non-zero exit code. Kubernetes restarted it. It crashed again. After enough consecutive failures, Kubernetes applies exponential backoff between restarts: 10s → 20s → 40s → 80s → 160s → 300s (5-minute cap). The pod is not "stuck" — it is actively being restarted on that schedule. The RESTARTS counter tells you how many cycles have completed.
Exit Code in describe Root Cause First Fix to Try Exit 1 Application error — exception on startup, missing env var, cannot connect to DB/API at boot time Read kubectl logs --previous for the actual error message Exit 0 Entrypoint command completed and exited. Container is not a daemon/service, it is a one-shot job. Fix the Dockerfile CMD or Deployment command to run a long-running process Exit 137 OOMKilled — container exceeded memory limit and was killed by Linux kernel See Problem 3 (OOMKilled runbook) Exit 143 Liveness probe timed out and kubelet sent SIGTERM to restart the container Increase initialDelaySeconds or add a startupProbe Exit 127 Command not found — binary in CMD/entrypoint does not exist in the container image Verify the binary exists: kubectl exec into a running copy or check the image locally
1
Before diving into specific problems, burn these three commands into muscle memory. They diagnose 90% of AKS failures. Run them in this exact order every time something breaks — not because there is anything magic about the sequence, but because each command's output guides what you look for in the next one.
kubectl get pods -A -o wide # All namespaces, with node assignment
kubectl get nodes -o wide # Node status and versions
kubectl get events -A --sort-by='.lastTimestamp' | tail -30 # Recent events, newest last
# STEP 2: Describe the problem resource
kubectl describe pod <pod-name> -n <namespace> # Read Events section carefully
kubectl describe node <node-name> # If node-level issue suspected
# STEP 3: Read the crash logs
kubectl logs <pod-name> -n <namespace> --previous # ← last crashed container (KEY)
kubectl logs <pod-name> -n <namespace> --previous --tail=100 # Last 100 lines
kubectl logs <pod-name> -n <namespace> -c <container-name> --previous # Multi-container pod
# BONUS: Resource consumption snapshot
kubectl top pods -n <namespace> # Actual CPU/memory usage
kubectl top nodes # Node-level resource pressure
What you see:
myapp-7d8f6b9c-xk4mp 0/1 CrashLoopBackOff 8 14m
What CrashLoopBackOff actually means: The container image pulled successfully. The container started. Then it crashed with a non-zero exit code. Kubernetes restarted it. It crashed again. After enough consecutive failures, Kubernetes applies exponential backoff between restarts: 10s → 20s → 40s → 80s → 160s → 300s (5-minute cap). The pod is not "stuck" — it is actively being restarted on that schedule. The RESTARTS counter tells you how many cycles have completed.
| Exit Code in describe | Root Cause | First Fix to Try |
|---|---|---|
| Exit 1 | Application error — exception on startup, missing env var, cannot connect to DB/API at boot time | Read kubectl logs --previous for the actual error message |
| Exit 0 | Entrypoint command completed and exited. Container is not a daemon/service, it is a one-shot job. | Fix the Dockerfile CMD or Deployment command to run a long-running process |
| Exit 137 | OOMKilled — container exceeded memory limit and was killed by Linux kernel | See Problem 3 (OOMKilled runbook) |
| Exit 143 | Liveness probe timed out and kubelet sent SIGTERM to restart the container | Increase initialDelaySeconds or add a startupProbe |
| Exit 127 | Command not found — binary in CMD/entrypoint does not exist in the container image | Verify the binary exists: kubectl exec into a running copy or check the image locally |
Identify the exit code
Read the previous container's logs
Use sleep infinity to inspect a crashing container
Check for missing ConfigMaps, Secrets, or environment variables
Fix liveness probe timing if exit code is 143
Problem 2ImagePullBackOff / ErrImagePull: Cannot Pull Container ImageAKS+ACR SpecificPre-start FailureWhat you see:
kubectl get pods and describe eventsmyapp-xyz 0/1 ImagePullBackOff 0 3m
Events:
Warning Failed kubelet Failed to pull image "acrprod.azurecr.io/myapp:v2.0":
rpc error: code = Unknown desc = failed to pull and unpack image:
unauthorized: authentication requiredKey distinction: ImagePullBackOff happens before the container starts — the image cannot be pulled. CrashLoopBackOff happens after the image pulls successfully. Confusing the two wastes significant debugging time. ErrImagePull is the first failure; ImagePullBackOff is the same error after Kubernetes begins applying exponential backoff between retry attempts.
1
What you see:
Events:
Warning Failed kubelet Failed to pull image "acrprod.azurecr.io/myapp:v2.0":
rpc error: code = Unknown desc = failed to pull and unpack image:
unauthorized: authentication required
Key distinction: ImagePullBackOff happens before the container starts — the image cannot be pulled. CrashLoopBackOff happens after the image pulls successfully. Confusing the two wastes significant debugging time. ErrImagePull is the first failure; ImagePullBackOff is the same error after Kubernetes begins applying exponential backoff between retry attempts.
Check AKS ↔ ACR authorisation (most common AKS-specific cause)
Verify the image name and tag exist
Check imagePullSecrets for private registries (non-ACR)
Check node network access to the registry
Figure 2 — Pod status decision tree: navigate from symptom to root cause in under 60 secondsStart with the STATUS column in kubectl get pods. Each status maps to a specific investigation path. Never skip directly to restarting pods — the status tells you which of the 9 problem runbooks in this guide to follow.Problem 3OOMKilled: Container Killed by Memory LimitExit Code 137Resource LayerWhat you see:
kubectl describe pod — Last State sectionLast State: Terminated
Reason: OOMKilled
Exit Code: 137
Started: Thu, 10 Jul 2026 14:32:10 +0000
Finished: Thu, 10 Jul 2026 14:34:51 +0000Root cause: The Linux kernel's OOM killer terminated the container because it exceeded the memory limit set in the container spec. OOMKilled is a deterministic signal — the container used more memory than allowed, so the kernel killed it. The fix is either to increase the limit (if the application legitimately needs more memory) or to fix a memory leak (if the application is consuming memory it should not be).
1
What you see:
Reason: OOMKilled
Exit Code: 137
Started: Thu, 10 Jul 2026 14:32:10 +0000
Finished: Thu, 10 Jul 2026 14:34:51 +0000
Root cause: The Linux kernel's OOM killer terminated the container because it exceeded the memory limit set in the container spec. OOMKilled is a deterministic signal — the container used more memory than allowed, so the kernel killed it. The fix is either to increase the limit (if the application legitimately needs more memory) or to fix a memory leak (if the application is consuming memory it should not be).
Confirm OOMKilled and read the current limit
Immediate fix: increase the memory limit
Distinguish memory limit from node memory pressure
Use kubectl top and Vertical Pod Autoscaler for right-sizing
Problem 4Pending Pods: Stuck in Scheduling LimboScheduler LayerMultiple CausesWhat you see:
kubectl get pods and describe eventsmyapp-xyz 0/1 Pending 0 15m
Events:
Warning FailedScheduling default-scheduler 0/3 nodes are available:
3 Insufficient memory. preemption: 0/3 nodes are available:
3 No preemption victims found for incoming pod.Critical diagnosis point: Pending means the Kubernetes scheduler cannot find a node that satisfies all the pod's requirements. The scheduler's reason is always in the Events section of kubectl describe pod. Read that message carefully — it tells you exactly which constraint is failing: insufficient memory, insufficient CPU, taint/toleration mismatch, node affinity rule not met, or PVC not bound.
Event Message Root Cause Fix Insufficient memory No node has enough free memory for the pod's requests.memory Scale node pool: az aks scale --node-count N or reduce memory request Insufficient CPU No node has enough free CPU for requests.cpu Scale node pool or reduce CPU request node(s) had untolerated taint Pod needs a toleration for a node taint (e.g., dedicated GPU nodes) Add tolerations to pod spec or remove node taint node(s) didn't match node affinity nodeSelector or nodeAffinity rules don't match any node's labels Fix nodeSelector labels or add label to node: kubectl label node PersistentVolumeClaim is not bound A PVC referenced by the pod has not been provisioned yet See Problem 7 (PVC runbook) pod has unbound immediate PersistentVolumeClaims PVC using WaitForFirstConsumer binding — pod must schedule first Check StorageClass and PVC status
kubectl — Diagnose why a pod is Pending# Read the scheduler failure reason
kubectl describe pod <pending-pod> -n <ns> | grep -A 10 "Events:"
# Check total available resources across all nodes
kubectl describe nodes | grep -A 5 "Allocated resources"
kubectl top nodes # Real-time CPU and memory
# Check node taints
kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints
# Scale AKS node pool to add capacity
az aks scale -g rg-prod -n aks-prod \
--node-count 5 --nodepool-name nodepool1
# Add a toleration to a pod spec for a tainted node
# tolerations:
# - key: "sku"
# operator: "Equal"
# value: "gpu"
# effect: "NoSchedule"Problem 5Node NotReady: Node Lost Contact with Control PlaneNode LayerHigh ImpactWhat you see:
kubectl get nodesNAME STATUS ROLES AGE VERSION
aks-nodepool1-27392819-0 NotReady agent 3d v1.32.0Root cause: The kubelet on the node has stopped sending heartbeats to the AKS control plane. The node's status transitions to NotReady after the heartbeat timeout (default 40 seconds). After 5 minutes in NotReady, Kubernetes moves pods to Unknown status and begins rescheduling them to healthy nodes. Common AKS-specific causes: the underlying Azure VM is experiencing hardware issues, the node has run out of disk space, or the kubelet process crashed due to memory pressure.
1
What you see:
Events:
Warning FailedScheduling default-scheduler 0/3 nodes are available:
3 Insufficient memory. preemption: 0/3 nodes are available:
3 No preemption victims found for incoming pod.
Critical diagnosis point: Pending means the Kubernetes scheduler cannot find a node that satisfies all the pod's requirements. The scheduler's reason is always in the Events section of kubectl describe pod. Read that message carefully — it tells you exactly which constraint is failing: insufficient memory, insufficient CPU, taint/toleration mismatch, node affinity rule not met, or PVC not bound.
| Event Message | Root Cause | Fix |
|---|---|---|
| Insufficient memory | No node has enough free memory for the pod's requests.memory | Scale node pool: az aks scale --node-count N or reduce memory request |
| Insufficient CPU | No node has enough free CPU for requests.cpu | Scale node pool or reduce CPU request |
| node(s) had untolerated taint | Pod needs a toleration for a node taint (e.g., dedicated GPU nodes) | Add tolerations to pod spec or remove node taint |
| node(s) didn't match node affinity | nodeSelector or nodeAffinity rules don't match any node's labels | Fix nodeSelector labels or add label to node: kubectl label node |
| PersistentVolumeClaim is not bound | A PVC referenced by the pod has not been provisioned yet | See Problem 7 (PVC runbook) |
| pod has unbound immediate PersistentVolumeClaims | PVC using WaitForFirstConsumer binding — pod must schedule first | Check StorageClass and PVC status |
kubectl describe pod <pending-pod> -n <ns> | grep -A 10 "Events:"
# Check total available resources across all nodes
kubectl describe nodes | grep -A 5 "Allocated resources"
kubectl top nodes # Real-time CPU and memory
# Check node taints
kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints
# Scale AKS node pool to add capacity
az aks scale -g rg-prod -n aks-prod \
--node-count 5 --nodepool-name nodepool1
# Add a toleration to a pod spec for a tainted node
# tolerations:
# - key: "sku"
# operator: "Equal"
# value: "gpu"
# effect: "NoSchedule"
What you see:
aks-nodepool1-27392819-0 NotReady agent 3d v1.32.0
Root cause: The kubelet on the node has stopped sending heartbeats to the AKS control plane. The node's status transitions to NotReady after the heartbeat timeout (default 40 seconds). After 5 minutes in NotReady, Kubernetes moves pods to Unknown status and begins rescheduling them to healthy nodes. Common AKS-specific causes: the underlying Azure VM is experiencing hardware issues, the node has run out of disk space, or the kubelet process crashed due to memory pressure.
Read the node conditions
Drain the node before attempting any repair
Check the Azure VM status in the portal
Delete the NotReady node and let AKS replace it
Problem 6DNS Resolution Failures Inside PodsSilent FailureNetworkingWhat you see: Your pods are Running. The application logs show connection refused, timeout, or "Name or service not known" errors when trying to reach other services within the cluster or external endpoints. DNS failures are the most insidious AKS problem because the pod appears healthy while silently failing to communicate.
1
What you see: Your pods are Running. The application logs show connection refused, timeout, or "Name or service not known" errors when trying to reach other services within the cluster or external endpoints. DNS failures are the most insidious AKS problem because the pod appears healthy while silently failing to communicate.
Test DNS resolution from a debug pod
Check CoreDNS pod status
Verify the service name format for cross-namespace DNS
Check node DNS configuration for external resolution
Problem 7Persistent Volume / PVC Stuck in PendingStorage LayerAKS Azure DisksWhat you see: A pod is Pending and kubectl describe pod shows "persistentvolumeclaim <name> not found" or "pod has unbound immediate PersistentVolumeClaims". The PVC itself shows STATUS: Pending.
1
What you see: A pod is Pending and kubectl describe pod shows "persistentvolumeclaim <name> not found" or "pod has unbound immediate PersistentVolumeClaims". The PVC itself shows STATUS: Pending.
Check PVC status and events
Verify the StorageClass exists and is correct
Check if the PVC is in a different AZ than the node
Check the CSI driver pods
Problem 8Service 503 / Ingress Not Routing TrafficNetworkingIngress / ServiceWhat you see: Pods are Running and appear healthy. External requests return HTTP 503 Service Unavailable or the connection is refused. The Ingress controller is reachable but traffic is not being routed to the application pods.
1
What you see: Pods are Running and appear healthy. External requests return HTTP 503 Service Unavailable or the connection is refused. The Ingress controller is reachable but traffic is not being routed to the application pods.
Verify Service selector matches pod labels
Check that Endpoints are populated
Verify pod readiness probes are passing
Check Ingress backend service name and port
Test internal connectivity from a debug pod
Problem 9AKS Auto-Upgrade Not Running / Maintenance Window SkippedAKS-SpecificControl PlaneWhat you see: The AKS cluster has an auto-upgrade channel configured (patch, stable, or rapid) with a scheduled maintenance window, but upgrades are not executing. The Kubernetes version is falling behind and security patches are not being applied.
Root cause patterns: The most common cause is a startDate in the maintenance configuration set to a future date — the window is defined but not yet active. Other causes: the maintenance window duration is under 4 hours (AKS minimum), the cluster has PodDisruptionBudgets that block node draining, or the autoUpgradeProfile.upgradeChannel is not set despite maintenance window configuration.
1
What you see: The AKS cluster has an auto-upgrade channel configured (patch, stable, or rapid) with a scheduled maintenance window, but upgrades are not executing. The Kubernetes version is falling behind and security patches are not being applied.
Root cause patterns: The most common cause is a startDate in the maintenance configuration set to a future date — the window is defined but not yet active. Other causes: the maintenance window duration is under 4 hours (AKS minimum), the cluster has PodDisruptionBudgets that block node draining, or the autoUpgradeProfile.upgradeChannel is not set despite maintenance window configuration.
Check the maintenance configuration for startDate issues
Verify the auto-upgrade channel is set
Verify the maintenance window duration is at least 4 hours
Check for PodDisruptionBudgets blocking node drain
Prevention: Production Health Baseline Every AKS Cluster Should Have
These are the controls that catch problems before they become incidents. Configure them at cluster creation, not after the first outage.
kubectl — Quick cluster health audit (run this first on any cluster you inherit)# Overall cluster health snapshot
kubectl get nodes -o wide
kubectl top nodes
kubectl get pods -A | grep -v Running | grep -v Completed # Non-healthy pods
kubectl get events -A --field-selector type=Warning --sort-by='.lastTimestamp' | tail -20
# Resource requests/limits coverage (pods without limits are high risk)
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].resources.limits == null) | .metadata.name'
# Pods with high restart counts
kubectl get pods -A --sort-by='.status.containerStatuses[0].restartCount' | tail -10
# PVCs not bound
kubectl get pvc -A | grep -v Bound
# AKS cluster version vs available upgrades
kubectl version --short
az aks get-upgrades -g rg-prod -n aks-prod -o tableProduction Baseline ChecklistResource requests and limits on every container. Pods without limits are OOMKill candidates and disrespect node capacity. Without requests, the scheduler cannot make informed placement decisions.
Readiness probes on every web-facing container. Without a readiness probe, a pod is added to Service endpoints immediately on start — before the application is ready to accept traffic — causing 503 errors during rolling deployments.
PodDisruptionBudgets with maxUnavailable ≥ 1. Allows AKS to drain nodes during upgrades and maintenance without blocking. A PDB with maxUnavailable: 0 will block all node operations.
Azure Monitor container insights enabled. az aks enable-addons -a monitoring -g <rg> -n <aks>. Provides memory/CPU metrics, OOMKill event alerts, and container log forwarding to Log Analytics without any application code changes.
These are the controls that catch problems before they become incidents. Configure them at cluster creation, not after the first outage.
kubectl get nodes -o wide
kubectl top nodes
kubectl get pods -A | grep -v Running | grep -v Completed # Non-healthy pods
kubectl get events -A --field-selector type=Warning --sort-by='.lastTimestamp' | tail -20
# Resource requests/limits coverage (pods without limits are high risk)
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].resources.limits == null) | .metadata.name'
# Pods with high restart counts
kubectl get pods -A --sort-by='.status.containerStatuses[0].restartCount' | tail -10
# PVCs not bound
kubectl get pvc -A | grep -v Bound
# AKS cluster version vs available upgrades
kubectl version --short
az aks get-upgrades -g rg-prod -n aks-prod -o table
Resource requests and limits on every container. Pods without limits are OOMKill candidates and disrespect node capacity. Without requests, the scheduler cannot make informed placement decisions.
Readiness probes on every web-facing container. Without a readiness probe, a pod is added to Service endpoints immediately on start — before the application is ready to accept traffic — causing 503 errors during rolling deployments.
PodDisruptionBudgets with maxUnavailable ≥ 1. Allows AKS to drain nodes during upgrades and maintenance without blocking. A PDB with maxUnavailable: 0 will block all node operations.
Azure Monitor container insights enabled. az aks enable-addons -a monitoring -g <rg> -n <aks>. Provides memory/CPU metrics, OOMKill event alerts, and container log forwarding to Log Analytics without any application code changes.
Quick Reference: Match Your Symptom to the Fix
CrashLoopBackOff → kubectl describe pod for exit code + kubectl logs --previous for error message. Exit 1 = app error. Exit 137 = OOMKilled. Exit 143 = liveness probe killed it.ImagePullBackOff on AKS+ACR → run az aks check-acr. If unauthorized: az aks update --attach-acr. For private ACR, also verify DNS resolution and private endpoint connectivity from the node subnet.OOMKilled (Exit 137) → increase limits.memory to 1.5-2× observed peak from kubectl top pods. Check kubectl describe node for node-level MemoryPressure — that requires adding nodes, not just raising limits.Pending pod → always read Events in kubectl describe pod first. Insufficient memory/CPU = scale the node pool. Taint issue = add tolerations. PVC issue = check StorageClass and CSI driver health.Node NotReady → drain first (kubectl drain --ignore-daemonsets), then delete the node (kubectl delete node). AKS auto-provisions a replacement within 5 minutes. Do not attempt to repair a broken production node in-place.503 / no traffic → check kubectl get endpoints. If <none>, the Service selector doesn't match pod labels or all pods are failing their readiness probe. Test internal connectivity with a debug pod before touching the Ingress.Auto-upgrade not running → check az aks maintenanceconfiguration show for a future startDate. Verify autoUpgradeProfile.upgradeChannel is not null. Ensure the maintenance window is at least 4 hours. Check for blocking PodDisruptionBudgets.The universal first step for any AKS problem: kubectl describe pod <name> then kubectl logs --previous <name>. These two commands, in this order, resolve 90% of AKS failures before reaching for any other diagnostic tool.
Frequently Asked Questions
A pod shows CrashLoopBackOff but kubectl logs returns nothing. How do I get the error?Use kubectl logs --previous <pod-name> — note the --previous flag. Without it, you are reading logs from the current (new) container instance, which may have just started and hasn't printed anything before crashing. The --previous flag reads logs from the last terminated container instance — the one that actually crashed and printed the error. If even --previous returns nothing, the container crashes too quickly to emit any output. In this case, temporarily patch the Deployment with command: ["sleep", "infinity"] to prevent the crash, then kubectl exec -it <pod> -- sh inside it and run your entrypoint command manually.How do I safely restart all pods in a Deployment without downtime?kubectl rollout restart deployment <name> -n <ns>. This performs a rolling restart — it gradually replaces pods one by one according to your Deployment's strategy.rollingUpdate settings. Monitor the rollout: kubectl rollout status deployment <name> -n <ns>. If the new pods are unhealthy, roll back: kubectl rollout undo deployment <name> -n <ns>. Never use kubectl delete pods in production — it creates an immediate outage for the number of pods you delete simultaneously.Pods are randomly restarting every few hours but logs show nothing wrong. What is causing this?Random restarts with no obvious log error typically have two causes. First, check if the liveness probe is timing out: kubectl describe pod → "Last State: Terminated Reason: Error Exit Code: 143" indicates a SIGTERM from the liveness probe. The application is taking longer than timeoutSeconds to respond to the probe. Fix: increase timeoutSeconds or add a startupProbe. Second, check for intermittent OOMKills: kubectl describe pod → "Last State: Terminated Reason: OOMKilled" with Exit Code 137. The application has periodic memory spikes (common in JVM applications during GC or in ML model inference). Use kubectl top pods under load to profile actual peak memory consumption.How do I run a one-off debug command in a production cluster without installing anything permanently?kubectl run debug-pod --image=nicolaka/netshoot -it --rm -n <namespace> -- bash. The --rm flag automatically deletes the pod when you exit the shell. The nicolaka/netshoot image contains nslookup, curl, dig, nmap, tcpdump, iperf, and dozens of other network diagnostic tools. For a minimal debugging session: kubectl run debug --image=alpine -it --rm -- sh. For running a command inside an existing running container (no new pod needed): kubectl exec -it <existing-pod> -n <ns> -- sh.
Related FAVRITE Articles
- How to Fix AKS Cluster Auto-Upgrade Not Executing During Scheduled Maintenance Window
- Top 100 Azure CLI Commands Every Cloud Engineer Should Know
- Stop Using Connection Strings: A Step-by-Step Guide to Azure Managed Identities in 2026
- Troubleshooting Azure DevOps Pipeline Timeouts: 5 Real-World Fixes That Work
- How to Fix AKS Cluster Auto-Upgrade Not Executing During Scheduled Maintenance Window
- Top 100 Azure CLI Commands Every Cloud Engineer Should Know
- Stop Using Connection Strings: A Step-by-Step Guide to Azure Managed Identities in 2026
- Troubleshooting Azure DevOps Pipeline Timeouts: 5 Real-World Fixes That Work