{"id":3471,"date":"2026-12-02T08:34:52","date_gmt":"2026-12-02T08:34:52","guid":{"rendered":"https:\/\/www.rajeshkumar.xyz\/blog\/?p=3471"},"modified":"2026-12-02T08:34:55","modified_gmt":"2026-12-02T08:34:55","slug":"production-kubernetes-troubleshooting-a-30-minute-triage-runbook","status":"publish","type":"post","link":"https:\/\/www.rajeshkumar.xyz\/blog\/production-kubernetes-troubleshooting-a-30-minute-triage-runbook\/","title":{"rendered":"Production Kubernetes Troubleshooting: A 30-Minute Triage Runbook"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a production application stops responding, Kubernetes engineers need to find the failure quickly without making the situation worse.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A failing Kubernetes application can involve several components. The problem may come from a crashed container, an unhealthy node, an unavailable dependency, a failed deployment, or a networking issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running random <code>kubectl<\/code> commands rarely provides a reliable diagnosis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A better approach is to follow a defined triage process. Start by confirming the impact, inspect cluster health, narrow the issue to a workload or infrastructure layer, and collect evidence before making changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This 30-minute Kubernetes troubleshooting runbook provides a practical way to do that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It uses a time-boxed investigation process, production-safe commands, common failure patterns, and clear recovery decision points.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The 30-minute target is for initial diagnosis, not a guarantee that every incident can be resolved in 30 minutes.<\/strong> A complex storage failure, control-plane outage, or multi-service dependency problem may require a longer investigation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is Production Kubernetes Troubleshooting?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Production Kubernetes troubleshooting is the process of identifying, investigating, and resolving problems affecting applications or infrastructure running in a live Kubernetes cluster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It involves several operational layers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Kubernetes control plane and API access.<\/li>\n\n\n\n<li>Worker nodes and container runtimes.<\/li>\n\n\n\n<li>Deployments, StatefulSets, and DaemonSets.<\/li>\n\n\n\n<li>Pods and individual containers.<\/li>\n\n\n\n<li>Services and internal networking.<\/li>\n\n\n\n<li>Ingress and external traffic routing.<\/li>\n\n\n\n<li>Persistent storage.<\/li>\n\n\n\n<li>Resource allocation and autoscaling.<\/li>\n\n\n\n<li>Application dependencies.<\/li>\n\n\n\n<li>Monitoring, logging, and tracing.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A production incident rarely provides a complete explanation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, an application may return HTTP 503 errors. The visible problem is unavailable service traffic. The actual cause might be zero ready replicas, failed readiness probes, an incorrect Service selector, or an unhealthy dependency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The troubleshooting process must connect the application symptom with the Kubernetes evidence.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The 30-Minute Kubernetes Incident Triage Plan<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use this timeline as the first investigation cycle.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Time<\/th><th>Investigation stage<\/th><th>Expected outcome<\/th><\/tr><tr><td>00\u201305 minutes<\/td><td>Confirm impact and cluster context<\/td><td>Identify the affected service and blast radius<\/td><\/tr><tr><td>05\u201310 minutes<\/td><td>Check API and node health<\/td><td>Identify cluster-wide or infrastructure problems<\/td><\/tr><tr><td>10\u201315 minutes<\/td><td>Inspect workloads and Pods<\/td><td>Locate the failing workload or container<\/td><\/tr><tr><td>15\u201320 minutes<\/td><td>Check Services and networking<\/td><td>Identify routing, endpoint, or DNS problems<\/td><\/tr><tr><td>20\u201325 minutes<\/td><td>Inspect resources and storage<\/td><td>Identify capacity, autoscaling, or persistence issues<\/td><\/tr><tr><td>25\u201330 minutes<\/td><td>Select a safe next action<\/td><td>Produce an evidence-backed mitigation or escalation plan<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This sequence is flexible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a clear failure is found early, investigate that failure instead of mechanically completing every stage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Before Starting: Production Safety Rules<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Production troubleshooting requires controlled access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A command that looks simple can still affect a live application. For example, restarting a Pod may interrupt active requests or cause a workload to fail again before its underlying problem is understood.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these rules before beginning.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Confirm the correct Kubernetes cluster and context.<\/li>\n\n\n\n<li>Identify the affected namespace and workload.<\/li>\n\n\n\n<li>Use an account with the minimum permissions necessary.<\/li>\n\n\n\n<li>Start with read-only investigation.<\/li>\n\n\n\n<li>Record important findings and timestamps.<\/li>\n\n\n\n<li>Avoid deleting or restarting resources during initial diagnosis.<\/li>\n\n\n\n<li>Never expose Kubernetes Secrets, access tokens, or customer information.<\/li>\n\n\n\n<li>Follow your incident-management and change-approval procedures.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> The investigation commands in this guide are read-only unless explicitly identified otherwise. Commands using <code>exec<\/code> or <code>debug<\/code> require additional care because they interact with live workloads or create debugging resources.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare your investigation variables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The examples use Bash-compatible shell syntax.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace these example values with the actual production environment.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">export<\/span> NS=<span class=\"hljs-string\">\"production\"<\/span>\n<span class=\"hljs-keyword\">export<\/span> DEPLOY=<span class=\"hljs-string\">\"checkout-api\"<\/span>\n<span class=\"hljs-keyword\">export<\/span> SVC=<span class=\"hljs-string\">\"checkout-api\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Do not copy these example names blindly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm that the application, namespace, and service exist before using the commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 1: Confirm the Incident and Cluster Context (00\u201305 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first task is to understand exactly what is failing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not begin by restarting Pods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Find out whether the incident affects:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One application endpoint.<\/li>\n\n\n\n<li>One workload.<\/li>\n\n\n\n<li>Multiple applications in one namespace.<\/li>\n\n\n\n<li>Several namespaces.<\/li>\n\n\n\n<li>A complete cluster.<\/li>\n\n\n\n<li>One region or availability zone.<\/li>\n\n\n\n<li>A particular customer group.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Record the incident start time, the first failing alert, the affected endpoint, and the latest known healthy state.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1. Verify the Kubernetes context<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">kubectl config current-context<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This displays the currently selected Kubernetes context.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">kubectl cluster-info<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This helps confirm which cluster your <code>kubectl<\/code> client is communicating with.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Never assume that a context name alone proves the target cluster is correct.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2. Verify basic cluster access<\/h3>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">kubectl version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check whether the client and server can exchange version information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then inspect your permissions:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl auth can-i get nodes\nkubectl auth can-i <span class=\"hljs-keyword\">list<\/span> pods -n <span class=\"hljs-string\">\"$NS\"<\/span>\nkubectl auth can-i <span class=\"hljs-keyword\">list<\/span> events -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This helps separate access problems from actual application problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An authorization error is not the same as an application outage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3. Check Kubernetes API health<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> --raw='\/readyz?verbose'<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The API server&#8217;s <code>\/readyz<\/code> endpoint reports whether it is ready to accept requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A failing readiness check may indicate an API server initialization or dependency issue, including problems involving etcd or watch-cache synchronization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Access to this endpoint can depend on cluster configuration and RBAC permissions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: Kubernetes API health endpoints:<br><a href=\"https:\/\/kubernetes.io\/docs\/reference\/using-api\/health-checks\/\">https:\/\/kubernetes.io\/docs\/reference\/using-api\/health-checks\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4. Review recent events<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get events -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  --sort-by=<span class=\"hljs-string\">'.metadata.creationTimestamp'<\/span> | tail -n <span class=\"hljs-number\">40<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FailedScheduling.<\/li>\n\n\n\n<li>FailedMount.<\/li>\n\n\n\n<li>FailedAttachVolume.<\/li>\n\n\n\n<li>Unhealthy.<\/li>\n\n\n\n<li>BackOff.<\/li>\n\n\n\n<li>Failed.<\/li>\n\n\n\n<li>Evicted.<\/li>\n\n\n\n<li>Successful or unsuccessful scaling events.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Events help identify what Kubernetes observed around the time of the incident.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not treat an old event as proof of the current root cause. Correlate its timestamp with the incident.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected outcome:<\/strong> You should know the affected namespace, application, cluster context, incident timeframe, and whether the API is reachable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 2: Check Kubernetes Nodes and Cluster Health (05\u201310 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If a workload is failing, inspect its node before assuming the application itself is responsible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A node problem can affect several unrelated workloads at once.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5. Check node status<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> nodes -o wide<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Review the <code>STATUS<\/code> column.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A healthy node generally shows:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">NAME           STATUS   ROLES    AGE   VERSION\nworker-node1   Ready    worker   ...   ...\nworker-node2   Ready    worker   ...   ...\nworker-node3   Ready    worker   ...   ...<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Investigate nodes showing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>NotReady.<\/li>\n\n\n\n<li>Unknown.<\/li>\n\n\n\n<li>Scheduling restrictions.<\/li>\n\n\n\n<li>Unexpected changes in Kubernetes version.<\/li>\n\n\n\n<li>Unusual node placement patterns.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6. Inspect node conditions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For an affected node:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">kubectl describe node NODE_NAME<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Replace <code>NODE_NAME<\/code> with the actual node name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Review the Conditions section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Important conditions include:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Condition<\/th><th>What it may indicate<\/th><\/tr><tr><td>Ready=False<\/td><td>Node is reporting an unhealthy state<\/td><\/tr><tr><td>Ready=Unknown<\/td><td>Node status cannot currently be confirmed<\/td><\/tr><tr><td>MemoryPressure=True<\/td><td>Available memory has reached a pressure condition<\/td><\/tr><tr><td>DiskPressure=True<\/td><td>Disk or filesystem resources are under pressure<\/td><\/tr><tr><td>PIDPressure=True<\/td><td>Available process identifiers are under pressure<\/td><\/tr><tr><td>NetworkUnavailable=True<\/td><td>Node network configuration is unavailable<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also review taints, allocated resources, and recent node events.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not remove node taints or change scheduling restrictions without understanding why they exist.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7. Check resource usage<\/h3>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">kubectl top nodes<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This displays recent CPU and memory consumption.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">NAME           CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%\nworker-node1   1250m        62%    4200Mi          68%\nworker-node2   900m         45%    3100Mi          51%\nworker-node3   1800m        90%    7200Mi          92%<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These values are illustrative.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command requires the Kubernetes Metrics API, usually provided by Metrics Server or another compatible implementation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A missing Metrics API does not automatically mean the node is unhealthy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, <code>kubectl top<\/code> is a recent usage snapshot. It does not replace historical monitoring or detailed operating-system metrics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference:<br><a href=\"https:\/\/kubernetes.io\/docs\/reference\/kubectl\/generated\/kubectl_top\/\">https:\/\/kubernetes.io\/docs\/reference\/kubectl\/generated\/kubectl_top\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What to do when a node is unhealthy<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check whether multiple affected workloads share the same node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compare node events, workload placement, and available capacity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the issue involves the worker node, collect evidence from the cluster monitoring system and the cloud provider or infrastructure platform.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not immediately restart the node or drain it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A drain can disrupt workloads, encounter PodDisruptionBudget restrictions, and affect services with limited replicas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected outcome:<\/strong> Identify whether the incident is isolated to one workload or connected to node health and cluster capacity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 3: Investigate Deployments and Pods (10\u201315 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is where many application-level incidents become easier to isolate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Deployment can exist and still have zero available replicas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Pod can be Running and still fail to serve requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the workload before deciding what to change.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8. Check workload status<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> deploy,sts,ds -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These commands list:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Deployments.<\/li>\n\n\n\n<li>StatefulSets.<\/li>\n\n\n\n<li>DaemonSets.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For a simple Deployment, healthy replicas should generally match the desired replica count, and the workload should report available replicas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now inspect Pods:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> pods -n \"$NS\" -o wide<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Pay attention to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>STATUS.<\/li>\n\n\n\n<li>READY.<\/li>\n\n\n\n<li>RESTARTS.<\/li>\n\n\n\n<li>NODE.<\/li>\n\n\n\n<li>AGE.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9. Describe the affected Pod<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe pod POD_NAME -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Replace <code>POD_NAME<\/code> with the affected Pod.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The output contains information about:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Container states.<\/li>\n\n\n\n<li>Restart history.<\/li>\n\n\n\n<li>Readiness.<\/li>\n\n\n\n<li>Liveness.<\/li>\n\n\n\n<li>Resource requests and limits.<\/li>\n\n\n\n<li>Volume mounts.<\/li>\n\n\n\n<li>Scheduling.<\/li>\n\n\n\n<li>Pod events.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This is often one of the most useful troubleshooting commands during an incident.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 10. Inspect application logs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For a running or recently restarted container:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl logs POD_NAME \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  -c CONTAINER_NAME \\\n  --since=<span class=\"hljs-number\">15<\/span>m \\\n  --timestamps=<span class=\"hljs-literal\">true<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If the container restarted, inspect its previous instance:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl logs POD_NAME \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  -c CONTAINER_NAME \\\n  --previous \\\n  --timestamps=<span class=\"hljs-literal\">true<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The <code>--previous<\/code> option is particularly useful when the current container is running again, but the original failure has disappeared.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the Pod contains only one container, the container name can generally be omitted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Review errors such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Failed database connections.<\/li>\n\n\n\n<li>Invalid configuration.<\/li>\n\n\n\n<li>Missing environment configuration.<\/li>\n\n\n\n<li>Permission errors.<\/li>\n\n\n\n<li>Failed dependency connections.<\/li>\n\n\n\n<li>Application exceptions.<\/li>\n\n\n\n<li>Failed startup or health checks.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not share unredacted production logs. They may contain personal data, tokens, internal hostnames, or sensitive request information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes documentation:<br><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug\/debug-application\/debug-running-pod\/\">https:\/\/kubernetes.io\/docs\/tasks\/debug\/debug-application\/debug-running-pod\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 11. Check recent deployment changes<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe deployment <span class=\"hljs-string\">\"$DEPLOY\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Review its conditions and events.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then inspect rollout history:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl rollout history deployment\/<span class=\"hljs-string\">\"$DEPLOY\"<\/span> \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check the rollout status:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl rollout status deployment\/<span class=\"hljs-string\">\"$DEPLOY\"<\/span> \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  --timeout=<span class=\"hljs-number\">10<\/span>s<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Compare the incident time with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Image changes.<\/li>\n\n\n\n<li>Configuration updates.<\/li>\n\n\n\n<li>Secret rotations.<\/li>\n\n\n\n<li>Deployment activity.<\/li>\n\n\n\n<li>Scaling changes.<\/li>\n\n\n\n<li>Infrastructure changes.<\/li>\n\n\n\n<li>GitOps synchronization.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A deployment that began immediately before the failure deserves attention, but timing alone does not prove causation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Kubernetes Pod Errors and Their Causes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following table to move from the observed symptom to the next investigation step.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Pod status or event<\/th><th>Possible cause<\/th><th>First investigation<\/th><\/tr><tr><td>Pending<\/td><td>Insufficient scheduling capacity or placement restrictions<\/td><td><code>describe pod<\/code><\/td><\/tr><tr><td>ImagePullBackOff<\/td><td>Incorrect image or registry access problem<\/td><td>Pod events and image details<\/td><\/tr><tr><td>ErrImagePull<\/td><td>Image retrieval failed<\/td><td>Image name, tag, credentials<\/td><\/tr><tr><td>CrashLoopBackOff<\/td><td>Application repeatedly exits<\/td><td>Previous container logs<\/td><\/tr><tr><td>OOMKilled<\/td><td>Container was terminated because of memory exhaustion<\/td><td>Termination reason and memory data<\/td><\/tr><tr><td>CreateContainerConfigError<\/td><td>Invalid configuration or missing reference<\/td><td>Pod description<\/td><\/tr><tr><td>FailedMount<\/td><td>Volume mounting problem<\/td><td>PVC and node events<\/td><\/tr><tr><td>Evicted<\/td><td>Node resource pressure<\/td><td>Node conditions and events<\/td><\/tr><tr><td>Running but not Ready<\/td><td>Readiness check or application problem<\/td><td>Probe configuration and logs<\/td><\/tr><tr><td>Terminating<\/td><td>Shutdown, storage, finalizer, or node issue<\/td><td>Pod description and controller status<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Understanding Pending Pods<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Pending Pod has not completed scheduling and startup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Common causes include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Insufficient CPU.<\/li>\n\n\n\n<li>Insufficient memory.<\/li>\n\n\n\n<li>Node selector mismatch.<\/li>\n\n\n\n<li>Node affinity requirements.<\/li>\n\n\n\n<li>Untolerated taints.<\/li>\n\n\n\n<li>Unavailable storage.<\/li>\n\n\n\n<li>ResourceQuota restrictions.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe pod POD_NAME -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Find the FailedScheduling event.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The scheduler filters nodes according to resource requests and scheduling constraints. A node with apparently low current CPU usage may still be ineligible because its allocatable capacity is already committed through requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Documentation:<br><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/kube-scheduler\/\">https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/kube-scheduler\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Understanding CrashLoopBackOff<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CrashLoopBackOff means Kubernetes is repeatedly trying to start a container after unsuccessful executions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is not the actual root cause.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the previous logs:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl logs POD_NAME \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  -c CONTAINER_NAME \\\n  --previous \\\n  --timestamps=<span class=\"hljs-literal\">true<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then inspect:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Exit reason.<\/li>\n\n\n\n<li>Exit code.<\/li>\n\n\n\n<li>Startup configuration.<\/li>\n\n\n\n<li>Application arguments.<\/li>\n\n\n\n<li>Readiness and liveness probes.<\/li>\n\n\n\n<li>Dependency availability.<\/li>\n\n\n\n<li>Resource limits.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A restart can hide the original failure if the relevant previous logs and events are not collected first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Understanding OOMKilled<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">OOMKilled indicates that the container was terminated following an out-of-memory condition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the termination reason, restart history, container memory limits, and historical memory metrics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CPU and memory requests serve different purposes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CPU limits can throttle a container, while memory limits can lead to termination when memory usage exceeds the applicable limit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not increase every memory limit blindly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A leak, excessive cache growth, a temporary burst, or an incorrect request-to-limit configuration needs a different solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Official reference:<br><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/configuration\/manage-resources-containers\/\">https:\/\/kubernetes.io\/docs\/concepts\/configuration\/manage-resources-containers\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 4: Troubleshoot Services, DNS, and Networking (15\u201320 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When Pods appear healthy but requests fail, investigate the network path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The connection may pass through an external load balancer, Ingress or Gateway, Service, EndpointSlice, and Pod.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A failure at any stage can affect application traffic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 12. Check the Kubernetes Service<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> svc -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Inspect the affected Service:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe service <span class=\"hljs-string\">\"$SVC\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Review:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Service type.<\/li>\n\n\n\n<li>Cluster IP.<\/li>\n\n\n\n<li>Port.<\/li>\n\n\n\n<li>Target port.<\/li>\n\n\n\n<li>Selector.<\/li>\n\n\n\n<li>Endpoints.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">An incorrect target port can prevent traffic from reaching the application even when Pods are healthy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 13. Inspect EndpointSlices<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get endpointslices \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  -l <span class=\"hljs-string\">\"kubernetes.io\/service-name=$SVC\"<\/span> \\\n  -o wide<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">EndpointSlices show the endpoints associated with a Service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the Service has no usable endpoints, investigate:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Service selector.<\/li>\n\n\n\n<li>Pod labels.<\/li>\n\n\n\n<li>Pod readiness.<\/li>\n\n\n\n<li>Endpoint conditions.<\/li>\n\n\n\n<li>Target Pod availability.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A readiness probe failure can remove a Pod from the EndpointSlices for matching Services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is why checking the Service without inspecting Pod readiness is insufficient.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Official documentation:<br><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug\/debug-application\/debug-service\/\">https:\/\/kubernetes.io\/docs\/tasks\/debug\/debug-application\/debug-service\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 14. Check Kubernetes DNS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When an application cannot resolve an internal Service name, investigate DNS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the DNS Service:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-19\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> svc kube-dns -n kube-system<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-19\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check DNS Pods:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-20\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> pods \\\n  -n kube-system \\\n  -l k8s-app=kube-dns<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-20\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then inspect DNS EndpointSlices:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-21\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> endpointslices \\\n  -n kube-system \\\n  -l kubernetes.io\/service-name=kube-dns<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-21\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These examples assume the cluster uses the standard CoreDNS Service arrangement. Managed distributions may use different configurations or labels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use an approved, existing diagnostic Pod to test resolution:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-22\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl exec -n <span class=\"hljs-string\">\"$NS\"<\/span> APPROVED_DEBUG_POD -- \\\n  nslookup <span class=\"hljs-string\">\"$SVC.$NS.svc.cluster.local\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-22\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The diagnostic container must have <code>nslookup<\/code> installed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not create a new debugging Pod in production without approval.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes DNS troubleshooting reference:<br><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/administer-cluster\/dns-debugging-resolution\/\">https:\/\/kubernetes.io\/docs\/tasks\/administer-cluster\/dns-debugging-resolution\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 15. Check NetworkPolicies<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-23\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> networkpolicy -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-23\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check whether any policies restrict communication between the affected workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Review:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ingress rules.<\/li>\n\n\n\n<li>Egress rules.<\/li>\n\n\n\n<li>Pod selectors.<\/li>\n\n\n\n<li>Namespace selectors.<\/li>\n\n\n\n<li>Destination ports.<\/li>\n\n\n\n<li>DNS access.<\/li>\n\n\n\n<li>Network plugin support.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Remember that NetworkPolicy enforcement requires a compatible network plugin. Merely creating a NetworkPolicy resource does not guarantee enforcement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Documentation:<br><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/network-policies\/\">https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/network-policies\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 16. Check external traffic routing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When internal Service communication works but external access fails, inspect:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ingress configuration.<\/li>\n\n\n\n<li>Gateway resources, where used.<\/li>\n\n\n\n<li>Ingress controller status.<\/li>\n\n\n\n<li>Load balancer health.<\/li>\n\n\n\n<li>DNS records.<\/li>\n\n\n\n<li>TLS certificates.<\/li>\n\n\n\n<li>Firewall rules.<\/li>\n\n\n\n<li>Cloud network security rules.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not change DNS, routing, or firewall configuration until the failing network layer is identified.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected outcome:<\/strong> Determine whether the application problem is inside the Pod, between Pods, at the Service layer, or outside the Kubernetes cluster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 5: Investigate Resources, Autoscaling, and Storage (20\u201325 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Resource issues can cause several unrelated symptoms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A workload may become unavailable because the cluster has insufficient capacity, storage has become unavailable, or autoscaling cannot provide the expected replicas.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 17. Check Pod resource usage<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-24\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl top pods -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-24\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Compare CPU and memory consumption with the configured requests and limits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unexpected memory growth.<\/li>\n\n\n\n<li>High CPU utilization.<\/li>\n\n\n\n<li>Uneven usage between replicas.<\/li>\n\n\n\n<li>Resource contention.<\/li>\n\n\n\n<li>Containers approaching their limits.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Remember that a short usage snapshot may miss an earlier spike.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use historical monitoring data when investigating intermittent incidents.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 18. Check Horizontal Pod Autoscaler<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-25\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> hpa -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-25\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Inspect the affected autoscaler:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-26\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe hpa HPA_NAME -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-26\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Current and target metrics.<\/li>\n\n\n\n<li>Minimum and maximum replicas.<\/li>\n\n\n\n<li>Scaling conditions.<\/li>\n\n\n\n<li>Unavailable metrics.<\/li>\n\n\n\n<li>Failed scaling events.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If the HPA cannot obtain its required metrics, scaling decisions may not behave as expected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also check whether the requested replicas can actually be scheduled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Increasing the desired replica count does not create additional worker-node capacity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 19. Check resource quotas<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-27\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> resourcequota,limitrange -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-27\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Inspect relevant quotas when Pods fail to be created or admitted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Namespace quotas may restrict CPU, memory, Pod counts, or other resources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can produce scheduling or admission problems even when the wider cluster appears healthy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 20. Check persistent storage<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-28\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> pvc -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-28\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Review the affected claim:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-29\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl describe pvc PVC_NAME -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-29\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pending claims.<\/li>\n\n\n\n<li>Failed volume provisioning.<\/li>\n\n\n\n<li>Failed attachment.<\/li>\n\n\n\n<li>Mount failures.<\/li>\n\n\n\n<li>Capacity issues.<\/li>\n\n\n\n<li>StorageClass problems.<\/li>\n\n\n\n<li>CSI driver errors.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For StatefulSets and database workloads, storage failures can create more serious availability and data-integrity risks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Never delete a production PVC as an improvised troubleshooting step.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not delete or recreate a volume merely to clear a mounting error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the storage provider&#8217;s documented recovery process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected outcome:<\/strong> Identify whether capacity, autoscaling, quota, or storage is contributing to the incident.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stage 6: Decide the Next Safe Action (25\u201330 Minutes)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By this point, the objective is to have enough evidence to recommend a controlled next step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not make several unrelated changes at once.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose one justified mitigation, assign an owner, and define how success will be verified.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 21. Identify the most likely failure layer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use this decision guide.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Evidence<\/th><th>Likely investigation area<\/th><\/tr><tr><td>API readiness failing<\/td><td>Kubernetes control plane or API dependencies<\/td><\/tr><tr><td>Several nodes NotReady<\/td><td>Node infrastructure or cluster networking<\/td><\/tr><tr><td>Many Pods Pending<\/td><td>Capacity or scheduling constraints<\/td><\/tr><tr><td>CrashLoopBackOff after deployment<\/td><td>Application, configuration, dependency, or startup failure<\/td><\/tr><tr><td>OOMKilled containers<\/td><td>Memory limit or application memory behaviour<\/td><\/tr><tr><td>Running Pods but no Service endpoints<\/td><td>Readiness or selector problems<\/td><\/tr><tr><td>Internal Service DNS failures<\/td><td>CoreDNS or cluster DNS configuration<\/td><\/tr><tr><td>Application works internally but external traffic fails<\/td><td>Ingress, Gateway, load balancer, DNS or TLS<\/td><\/tr><tr><td>PVC Pending or FailedMount<\/td><td>Storage provisioning or attachment<\/td><\/tr><tr><td>HPA unable to scale<\/td><td>Metrics, configuration or available capacity<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One symptom can have multiple causes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use supporting evidence and counter-evidence before assigning a root cause.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 22. Check for a recent known-bad deployment<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the incident started immediately after a deployment, inspect:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-30\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl rollout history deployment\/<span class=\"hljs-string\">\"$DEPLOY\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-30\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Confirm:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The affected revision.<\/li>\n\n\n\n<li>The last known healthy revision.<\/li>\n\n\n\n<li>Image and configuration changes.<\/li>\n\n\n\n<li>Whether the database schema changed.<\/li>\n\n\n\n<li>Whether external dependencies changed.<\/li>\n\n\n\n<li>Whether the application is managed through GitOps.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A rollback may be appropriate when the new revision is clearly responsible, and the previous revision is compatible with current data and dependencies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For GitOps-managed environments, prefer reverting the relevant change through the approved GitOps workflow. A manual cluster change may be overwritten by reconciliation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 23. Define the recovery action<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before a change, agree on:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>The specific problem being addressed.<\/li>\n\n\n\n<li>The resource that will change.<\/li>\n\n\n\n<li>The expected benefit.<\/li>\n\n\n\n<li>The potential service impact.<\/li>\n\n\n\n<li>The rollback procedure.<\/li>\n\n\n\n<li>The responsible engineer.<\/li>\n\n\n\n<li>The person approving the change.<\/li>\n\n\n\n<li>The health signals that will confirm recovery.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">For a confirmed bad Deployment revision, an authorized rollback may use:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-31\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl rollout undo deployment\/<span class=\"hljs-string\">\"$DEPLOY\"<\/span> \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  --to-revision=REVISION_NUMBER<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-31\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This command changes the live workload.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is not part of the read-only triage sequence. Use it only after reviewing the revision and following your production change procedure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify the rollout:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-32\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl rollout status deployment\/<span class=\"hljs-string\">\"$DEPLOY\"<\/span> \\\n  -n <span class=\"hljs-string\">\"$NS\"<\/span> \\\n  --timeout=<span class=\"hljs-number\">120<\/span>s<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-32\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then verify actual application behaviour. A successful Kubernetes rollout does not automatically prove that all external dependencies or customer requests are healthy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Official reference:<br><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/run-application\/update-deployment-rolling\/\">https:\/\/kubernetes.io\/docs\/tasks\/run-application\/update-deployment-rolling\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Production Kubernetes Troubleshooting: Commands Quick Reference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Keep this command list available during on-call rotations.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Purpose<\/th><th>Command<\/th><\/tr><tr><td>Current context<\/td><td><code>kubectl config current-context<\/code><\/td><\/tr><tr><td>Cluster information<\/td><td><code>kubectl cluster-info<\/code><\/td><\/tr><tr><td>API readiness<\/td><td><code>kubectl get --raw='\/readyz?verbose'<\/code><\/td><\/tr><tr><td>List nodes<\/td><td><code>kubectl get nodes -o wide<\/code><\/td><\/tr><tr><td>Describe node<\/td><td><code>kubectl describe node NODE_NAME<\/code><\/td><\/tr><tr><td>List Pods<\/td><td><code>kubectl get pods -n \"$NS\" -o wide<\/code><\/td><\/tr><tr><td>Describe Pod<\/td><td><code>kubectl describe pod POD_NAME -n \"$NS\"<\/code><\/td><\/tr><tr><td>Application logs<\/td><td><code>kubectl logs POD_NAME -n \"$NS\"<\/code><\/td><\/tr><tr><td>Previous container logs<\/td><td><code>kubectl logs POD_NAME -n \"$NS\" --previous<\/code><\/td><\/tr><tr><td>List workloads<\/td><td><code>kubectl get deploy,sts,ds -n \"$NS\"<\/code><\/td><\/tr><tr><td>Deployment history<\/td><td><code>kubectl rollout history deployment\/\"$DEPLOY\" -n \"$NS\"<\/code><\/td><\/tr><tr><td>Check Service<\/td><td><code>kubectl describe service \"$SVC\" -n \"$NS\"<\/code><\/td><\/tr><tr><td>EndpointSlices<\/td><td><code>kubectl get endpointslices -n \"$NS\"<\/code><\/td><\/tr><tr><td>Node resource usage<\/td><td><code>kubectl top nodes<\/code><\/td><\/tr><tr><td>Pod resource usage<\/td><td><code>kubectl top pods -n \"$NS\"<\/code><\/td><\/tr><tr><td>HPA information<\/td><td><code>kubectl get hpa -n \"$NS\"<\/code><\/td><\/tr><tr><td>PVC information<\/td><td><code>kubectl get pvc -n \"$NS\"<\/code><\/td><\/tr><tr><td>Recent events<\/td><td><code>kubectl get events -n \"$NS\"<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These are diagnostic commands, not guaranteed solutions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Always select the correct context, namespace, resource, and container before using them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes During Production Kubernetes Incidents<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Restarting Pods before investigating<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A restart can remove useful transient evidence and may not address the underlying problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Collect events, container states, and previous logs first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Deleting a Pod to fix every issue<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A controller may recreate the Pod, but the replacement can fail for the same reason.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understand the cause before requesting replacement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Increasing memory limits without investigating<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A higher limit may temporarily hide a memory leak or excessive allocation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compare historical memory use with the application&#8217;s expected workload.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Draining unhealthy nodes without a capacity plan<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Moving workloads can increase pressure on remaining nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check spare capacity, PodDisruptionBudgets, storage behaviour, and scheduling constraints before any drain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Changing several resources together<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Multiple simultaneous changes make causal diagnosis difficult.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Change one justified variable at a time where operationally safe, and record each change.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ignoring monitoring history<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A current snapshot may look healthy after a short-lived outage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Correlate metrics, application logs, Kubernetes events, and traces using the same incident time window.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Treating Running as Healthy<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A running container may not be ready to receive traffic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Always review readiness and Service endpoints.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building a Better Kubernetes Incident Response Process<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A good troubleshooting runbook should not end when the application recovers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the incident to improve future response quality.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Build an incident evidence packet<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For every serious incident, capture:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Field<\/th><th>Information to record<\/th><\/tr><tr><td>Incident ID<\/td><td>Unique incident reference<\/td><\/tr><tr><td>Start time<\/td><td>Timestamp with time zone<\/td><\/tr><tr><td>Cluster<\/td><td>Affected environment<\/td><\/tr><tr><td>Namespace<\/td><td>Affected namespace<\/td><\/tr><tr><td>Workload<\/td><td>Deployment, StatefulSet, or other controller<\/td><\/tr><tr><td>User impact<\/td><td>Affected functionality and requests<\/td><\/tr><tr><td>Last known healthy state<\/td><td>Last confirmed working condition<\/td><\/tr><tr><td>Recent changes<\/td><td>Releases, configuration, infrastructure<\/td><\/tr><tr><td>Observed evidence<\/td><td>Events, logs, metrics, traces<\/td><\/tr><tr><td>Root cause confidence<\/td><td>Confirmed, probable, or unknown<\/td><\/tr><tr><td>Recovery action<\/td><td>Approved change and owner<\/td><\/tr><tr><td>Verification<\/td><td>Health checks after the change<\/td><\/tr><tr><td>Follow-up<\/td><td>Preventive engineering work<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid treating a probable cause as a confirmed root cause.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Improve observability<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Production Kubernetes environments need correlated operational signals.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The three major observability signals are:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Metrics:<\/strong> Show resource consumption, error rates, latency, saturation, and capacity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Logs:<\/strong> Show application and system events.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Traces:<\/strong> Help follow requests across distributed services and identify latency or dependency problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A typical monitoring pipeline may include Prometheus, Grafana, a centralized log platform, and distributed tracing through OpenTelemetry.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The right combination depends on infrastructure, workload size, retention needs, and operational budget.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See the official Kubernetes observability documentation:<br><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/cluster-administration\/observability\/\">https:\/\/kubernetes.io\/docs\/concepts\/cluster-administration\/observability\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Turn recurring incidents into permanent improvements.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After recovery:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify why the alert did not provide enough information.<\/li>\n\n\n\n<li>Review workload resource requests and limits.<\/li>\n\n\n\n<li>Correct ineffective probes.<\/li>\n\n\n\n<li>Add missing application metrics.<\/li>\n\n\n\n<li>Improve deployment validation.<\/li>\n\n\n\n<li>Review dependency failure handling.<\/li>\n\n\n\n<li>Update the incident runbook.<\/li>\n\n\n\n<li>Add tests for the failure scenario.<\/li>\n\n\n\n<li>Assign preventive work to an owner.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The objective is not just to resolve today&#8217;s incident. It is to reduce the chance that the same failure returns.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When Should You Escalate?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some production issues should not be handled by ordinary application-level troubleshooting alone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Escalate to the platform or cloud infrastructure team when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Kubernetes API is unavailable.<\/li>\n\n\n\n<li>Several worker nodes become unreachable.<\/li>\n\n\n\n<li>Control-plane health checks continue failing.<\/li>\n\n\n\n<li>Container runtimes fail across multiple nodes.<\/li>\n\n\n\n<li>Persistent storage may be damaged.<\/li>\n\n\n\n<li>Networking problems affect several namespaces.<\/li>\n\n\n\n<li>The incident involves suspected credential compromise.<\/li>\n\n\n\n<li>Recovery could result in data loss.<\/li>\n\n\n\n<li>The team cannot establish a safe rollback.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not wait until the 30-minute window expires when the incident already requires specialist intervention.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How do you troubleshoot Kubernetes in production?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start by confirming the affected application and blast radius. Verify cluster context, API health, node conditions, workload status, Pod events, logs, Services, networking, resources, and storage. Collect evidence before changing live resources.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What should I check first when a Kubernetes Pod is failing?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>kubectl describe pod<\/code> and inspect its events and container states. Then check the application logs. If the container restarted, retrieve the previous container logs using. <code>kubectl logs --previous<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What causes CrashLoopBackOff in Kubernetes?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Common causes include application startup errors, incorrect configuration, missing dependencies, failed liveness probes, and memory termination. CrashLoopBackOff describes repeated restart behaviour, not a specific root cause.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How can I identify an OOMKilled container?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the container&#8217;s last termination state and reason in Pod details. Compare memory limits with historical resource metrics. Do not assume that every exit code 137 proves an OOM event.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I troubleshoot a Kubernetes Service with no endpoints?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the Service selector, matching Pod labels, Pod readiness, and EndpointSlices. A readiness failure can make a Pod unavailable as a Service endpoint.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is kubectl top enough for production monitoring?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. It provides recent CPU and memory usage through the Metrics API when available. Historical analysis, application metrics, logs, and traces are needed for deeper investigation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is it safe to restart a production Kubernetes Pod?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not automatically. Review replication, PodDisruptionBudgets, active traffic, application state, and the underlying failure first. Follow the approved incident and change procedure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can a Kubernetes incident always be resolved within 30 minutes?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The 30-minute workflow is intended to establish the impact, probable failure layer, evidence, and next action. Complex incidents may need more investigation and specialist support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Production Kubernetes troubleshooting works best when engineers follow evidence instead of guessing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start by confirming the incident. Check cluster and node health. Inspect workload states, container logs, network paths, resources, and storage. Then choose one controlled recovery action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A 30-minute triage process gives on-call engineers a consistent starting point. It also creates better incident records and makes escalation easier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the runbook updated as your architecture and Kubernetes environment change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The most important production rule is simple: understand the failure before changing the cluster.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a production application stops responding, Kubernetes engineers need to find the failure quickly without making the situation worse. A&#8230; <\/p>\n","protected":false},"author":7,"featured_media":3472,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[735],"tags":[142,27,170,26],"series":[],"class_list":["post-3471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-devops","tag-devsecops","tag-kubernetes","tag-sre"],"_links":{"self":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/comments?post=3471"}],"version-history":[{"count":1,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3471\/revisions"}],"predecessor-version":[{"id":3473,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3471\/revisions\/3473"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media\/3472"}],"wp:attachment":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media?parent=3471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/categories?post=3471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/tags?post=3471"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/series?post=3471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}