<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Troubleshooting on vishctl</title><link>https://vishctl.dev/tags/troubleshooting/</link><description>Recent content in Troubleshooting on vishctl</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 19 Nov 2026 09:00:00 +0800</lastBuildDate><atom:link href="https://vishctl.dev/tags/troubleshooting/index.xml" rel="self" type="application/rss+xml"/><item><title>Why Is My GPU Pod Pending? A Seven-Step Checklist</title><link>https://vishctl.dev/posts/kubernetes-gpu-pod-pending-troubleshooting/</link><pubDate>Thu, 19 Nov 2026 09:00:00 +0800</pubDate><guid>https://vishctl.dev/posts/kubernetes-gpu-pod-pending-troubleshooting/</guid><category>kubernetes</category><category>gpu</category><category>scheduling</category><category>troubleshooting</category><category>nvidia</category><category>ai-infra</category><description>A simple, diagram-first checklist for a GPU Pod stuck in Pending on Kubernetes: how to read the scheduler&amp;#39;s message, the seven rules a node must pass, and the kubectl command that checks each one.</description><content:encoded><![CDATA[<p>You apply a Deployment that asks for a GPU. The Pod appears, and then nothing happens. <code>STATUS: Pending</code>, minute after minute.</p>
<p>The cluster has GPUs. Some of them even look free. So why will the Pod not start?</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Pending  = the scheduler has not found one node that passes every rule
</span></span><span class="line"><span class="cl">Your job = find the one rule that no node can pass
</span></span></code></pre></div><figure class="mermaid-figure">
  <div class="mermaid">flowchart LR
    N["8 nodes<br/>in the cluster"] f1@--> G["3 have a<br/>free GPU"]
    G f2@--> T["2 accept<br/>this Pod's<br/>tolerations"]
    T f3@--> S["1 matches<br/>the node<br/>selector"]
    S f4@--> C["0 have enough<br/>CPU left"]
    C f5@--> P["Pending"]

    f1@{ animate: true }
    f2@{ animate: true }
    f3@{ animate: true }
    f4@{ animate: true }
    f5@{ animate: true }

    classDef input fill:#13264a,stroke:#38bdf8,color:#e6f6ff,stroke-width:2px;
    classDef gpu fill:#173f59,stroke:#22d3ee,color:#ecfeff,stroke-width:2px;
    classDef tree fill:#281d48,stroke:#a78bfa,color:#f1edff,stroke-width:2px;
    classDef warn fill:#302410,stroke:#fbbf24,color:#fff3cf,stroke-width:2px;
    class N input;
    class G gpu;
    class T,S tree;
    class C,P warn;</div>
  <figcaption>The scheduler is a funnel. Every rule removes nodes. If the last rule leaves zero, the Pod stays Pending, even though earlier stages looked fine.</figcaption>
</figure>

<p>A GPU Pod has more rules to pass than an ordinary Pod, which is why it gets stuck more often. This post is a checklist to work through in order, with the command for each step.</p>
<h2 id="step-0-read-what-the-scheduler-said">Step 0: read what the scheduler said</h2>
<p>Before guessing, ask. The scheduler writes its reason into the Pod&rsquo;s events.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl describe pod &lt;pod-name&gt; <span class="p">|</span> sed -n <span class="s1">&#39;/Events:/,$p&#39;</span>
</span></span></code></pre></div><p>You will see a line like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">0/8 nodes are available: 5 Insufficient nvidia.com/gpu, 2 node(s) had untolerated taint {nvidia.com/gpu: present}, 1 Insufficient cpu.
</span></span></code></pre></div><p>Read it as a tally. The numbers add up to the node count, and each phrase is one rule that removed some nodes. Here: five nodes had no free GPU, two refused the Pod because of a taint, and one had a GPU but not enough CPU.</p>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Phrase in the event</th>
            <th scope="col">What it means</th>
            <th scope="col">Go to</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>Insufficient nvidia.com/gpu</code></td>
            <td>Not enough free GPUs on that node</td>
            <td>Steps 1 and 2</td>
        </tr>
        <tr>
            <td><code>had untolerated taint</code></td>
            <td>The node repels Pods without a matching toleration</td>
            <td>Step 3</td>
        </tr>
        <tr>
            <td><code>didn't match Pod's node affinity/selector</code></td>
            <td>Your selector excludes that node</td>
            <td>Step 4</td>
        </tr>
        <tr>
            <td><code>Insufficient cpu</code> or <code>Insufficient memory</code></td>
            <td>The GPU is free but CPU or RAM is not</td>
            <td>Step 5</td>
        </tr>
        <tr>
            <td><code>unbound immediate PersistentVolumeClaims</code> or <code>volume node affinity conflict</code></td>
            <td>Storage is the blocker</td>
            <td>Step 7</td>
        </tr>
    </tbody>
  </table>
</div>
<p>No Pod at all? If the Deployment exists but no Pod was created, the problem is not scheduling. Jump to step 6.</p>
<h2 id="step-1-does-kubernetes-see-any-gpus">Step 1: does Kubernetes see any GPUs?</h2>
<p>A GPU that the host can see is not automatically one that Kubernetes can count.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get nodes -o custom-columns<span class="o">=</span><span class="s1">&#39;NODE:.metadata.name,GPUS:.status.allocatable.nvidia\.com/gpu&#39;</span>
</span></span></code></pre></div><div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Output</th>
            <th scope="col">Meaning</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>A number on your GPU nodes</td>
            <td>Good. Go to step 2</td>
        </tr>
        <tr>
            <td><code>&lt;none&gt;</code> on a node that has GPUs</td>
            <td>The device plugin is not advertising them</td>
        </tr>
    </tbody>
  </table>
</div>
<p>If it says <code>&lt;none&gt;</code>, scheduling is not your problem yet. The GPU software stack is. My <a href="https://vishctl.dev/posts/kubernetes-gpu-platform-engineering/">GPU platform guide</a> walks through that layer by layer, and the <a href="https://vishctl.dev/posts/vllm-on-wsl2-minikube/">WSL2 post</a> shows a real case of exactly this failure.</p>
<h2 id="step-2-are-the-gpus-free-and-free-together">Step 2: are the GPUs free, and free together?</h2>
<p>Allocatable is the total. You need to know what is left.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl describe nodes <span class="p">|</span> grep -E <span class="s1">&#39;^Name:|nvidia.com/gpu[: ]&#39;</span>
</span></span></code></pre></div><p>For each node this prints the capacity, the allocatable count, and how many are already requested. Subtract to get the free GPUs. The <code>[: ]</code> at the end skips the many <code>nvidia.com/gpu.*</code> labels that would otherwise flood the output.</p>
<p>Then check the rule that surprises people most: <strong>a Pod cannot span nodes.</strong> A Pod asking for 4 GPUs needs all 4 on one machine.</p>
<figure class="mermaid-figure">
  <div class="mermaid">flowchart TD
    subgraph SPREAD["Free GPUs spread out"]
        direction LR
        A1["Node A<br/>2 free"] ~~~ A2["Node B<br/>2 free"]
        A2 ~~~ A3["Node C<br/>2 free"]
        A3 a1@--> A4["4-GPU Pod<br/>Pending"]
    end

    subgraph PACKED["Free GPUs packed"]
        direction LR
        B1["Node A<br/>4 free"] ~~~ B2["Node B<br/>2 free"]
        B2 ~~~ B3["Node C<br/>0 free"]
        B3 b1@--> B4["4-GPU Pod<br/>runs on A"]
    end

    SPREAD ~~~ PACKED
    a1@{ animate: true }
    b1@{ animate: true }

    classDef idle fill:#101e27,stroke:#324950,color:#8aa0a8;
    classDef gpu fill:#173f59,stroke:#22d3ee,color:#ecfeff,stroke-width:2px;
    classDef warn fill:#302410,stroke:#fbbf24,color:#fff3cf,stroke-width:2px;
    class A1,A2,A3,B2,B3 idle;
    class B1,B4 gpu;
    class A4 warn;</div>
  <figcaption>Top: six GPUs are free in total, but no single node has four, so a 4-GPU Pod stays Pending. Bottom: the same six free GPUs, packed differently, and the Pod fits.</figcaption>
</figure>

<p>This is <strong>fragmentation</strong>. The fix is to move or stop a small Pod so that one node has enough room, or to request fewer GPUs per Pod.</p>
<p>One more thing to check here: the resource name. If the node uses <a href="https://vishctl.dev/posts/kubernetes-gpu-sharing-time-slicing-mps-mig/">MIG or time-slicing</a>, GPUs may be advertised as <code>nvidia.com/mig-1g.10gb</code> or <code>nvidia.com/gpu.shared</code>. A Pod asking for plain <code>nvidia.com/gpu</code> on such a node will report <code>Insufficient</code>, even with free slices.</p>
<h2 id="step-3-taints-and-tolerations">Step 3: taints and tolerations</h2>
<p>GPU nodes are usually tainted so that ordinary Pods stay off the expensive hardware. A taint means &ldquo;keep out unless you have a pass&rdquo;.</p>
<p>See the taints:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get nodes -o custom-columns<span class="o">=</span><span class="s1">&#39;NODE:.metadata.name,TAINTS:.spec.taints[*].key&#39;</span>
</span></span></code></pre></div><p>If a GPU node shows a taint such as <code>nvidia.com/gpu</code>, your Pod needs a matching toleration:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="w">    </span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">tolerations</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span>- <span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l">nvidia.com/gpu</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">operator</span><span class="p">:</span><span class="w"> </span><span class="l">Exists</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">effect</span><span class="p">:</span><span class="w"> </span><span class="l">NoSchedule</span><span class="w">
</span></span></span></code></pre></div><p>A toleration only means &ldquo;allowed&rdquo;. It does not pull the Pod toward that node. That is the job of the next step.</p>
<h2 id="step-4-node-selectors-and-affinity">Step 4: node selectors and affinity</h2>
<p>Selectors do the opposite of taints: they restrict where your Pod is willing to go. A typo here is a very common cause of Pending.</p>
<p>Look at what the Pod demands:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get pod &lt;pod-name&gt; -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">&#39;{.spec.nodeSelector}{&#34;\n&#34;}{.spec.affinity}{&#34;\n&#34;}&#39;</span>
</span></span></code></pre></div><p>Then look at what the nodes actually offer. This shows the GPU model label on every node:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get nodes -L nvidia.com/gpu.product
</span></span></code></pre></div><p>Compare them character by character. <code>NVIDIA-H100-80GB-HBM3</code> and <code>H100</code> are not the same string, and a selector on a label that no node has matches nothing.</p>
<h2 id="step-5-cpu-and-memory">Step 5: CPU and memory</h2>
<p>This one hides well, because the event still mentions GPUs for the other nodes.</p>
<p>A GPU Pod also asks for CPU and RAM. GPU nodes run several system DaemonSets (driver, device plugin, monitoring), and those take a share before your Pod arrives.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl describe node &lt;node-name&gt; <span class="p">|</span> sed -n <span class="s1">&#39;/Allocated resources:/,/Events:/p&#39;</span>
</span></span></code></pre></div><p>Check the <code>cpu</code> and <code>memory</code> lines against your Pod&rsquo;s requests. If the node has a free GPU but only 2 CPUs left and you ask for 8, the Pod cannot land there.</p>
<p>A simple guard: keep per-GPU requests proportional to the node. On a node with 8 GPUs and 64 CPUs, a Pod that takes 1 GPU and 16 CPUs leaves the last four GPUs unusable.</p>
<h2 id="step-6-quotas">Step 6: quotas</h2>
<p>A ResourceQuota can cap GPUs per namespace. When you exceed it, the Pod is <strong>never created</strong>, so there is nothing Pending to describe. The error is on the ReplicaSet instead.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl -n &lt;namespace&gt; describe resourcequota
</span></span></code></pre></div><p>Look for <code>requests.nvidia.com/gpu</code> and compare used against hard. Then confirm on the workload:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl -n &lt;namespace&gt; get events --field-selector <span class="nv">reason</span><span class="o">=</span>FailedCreate
</span></span></code></pre></div><p>A message containing <code>exceeded quota</code> settles it. Either free up GPUs in that namespace or ask for a bigger quota.</p>
<h2 id="step-7-storage">Step 7: storage</h2>
<p>If the Pod mounts a volume, the volume gets a vote too.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl -n &lt;namespace&gt; get pvc
</span></span></code></pre></div><div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">What you see</th>
            <th scope="col">Meaning</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>PVC is <code>Pending</code></td>
            <td>No volume has been provisioned. Check the storage class</td>
        </tr>
        <tr>
            <td>Event says <code>volume node affinity conflict</code></td>
            <td>The volume lives in one zone, the free GPU in another</td>
        </tr>
    </tbody>
  </table>
</div>
<p>The zone conflict is common with model caches. A disk created in zone A can only attach to nodes in zone A. If the only free GPU is in zone B, the Pod waits forever.</p>
<p>A shared file system avoids this, as described in my <a href="https://vishctl.dev/posts/vllm-cold-start-model-cache-kubernetes/">cold start guide</a>.</p>
<h2 id="the-whole-checklist-in-one-picture">The whole checklist in one picture</h2>
<figure class="mermaid-figure">
  <div class="mermaid">flowchart TD
    S0["Read the Pod's events"] k1@--> S1["Does Kubernetes<br/>see GPUs?"]
    S1 k2@--> S2["Enough free GPUs<br/>on one node?"]
    S2 k3@--> S3["Taints<br/>tolerated?"]
    S3 k4@--> S4["Selector matches<br/>a real label?"]
    S4 k5@--> S5["CPU and memory<br/>left?"]
    S5 k6@--> S6["Quota and<br/>storage OK?"]

    k1@{ animate: true }
    k2@{ animate: true }
    k3@{ animate: true }
    k4@{ animate: true }
    k5@{ animate: true }
    k6@{ animate: true }

    classDef input fill:#13264a,stroke:#38bdf8,color:#e6f6ff,stroke-width:2px;
    classDef gpu fill:#173f59,stroke:#22d3ee,color:#ecfeff,stroke-width:2px;
    classDef tree fill:#281d48,stroke:#a78bfa,color:#f1edff,stroke-width:2px;
    class S0 input;
    class S1,S2 gpu;
    class S3,S4,S5,S6 tree;</div>
  <figcaption>Work down the list. Stop at the first step that fails: that is the rule no node can pass.</figcaption>
</figure>

<h2 id="when-pending-is-normal">When Pending is normal</h2>
<p>Not every Pending Pod is a problem.</p>
<p><strong>The cluster is adding a node.</strong> If you run a cluster autoscaler, a Pending Pod is the signal it scales on. Look for a <code>TriggeredScaleUp</code> event on the Pod. A GPU node can take several minutes to arrive, so Pending during that time is expected.</p>
<p>If you see <code>NotTriggerScaleUp</code> instead, the autoscaler looked and decided no node group could fit the Pod. That usually points back to steps 3 to 5, or to a node group that is already at its maximum size.</p>
<p><strong>A more important Pod should go first.</strong> If every GPU is busy with batch work, an inference Pod can wait behind it. Give inference a higher priority, and the scheduler will evict lower-priority Pods to make room:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># inference-priority.yaml</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">scheduling.k8s.io/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PriorityClass</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">inference-high</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">value</span><span class="p">:</span><span class="w"> </span><span class="m">100000</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">globalDefault</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Online inference. May preempt batch workloads.&#34;</span><span class="w">
</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f inference-priority.yaml
</span></span></code></pre></div><p>Then set <code>priorityClassName: inference-high</code> in the Pod spec. Use this carefully: preempted batch jobs lose their progress unless they checkpoint.</p>
<h2 id="common-causes-ranked">Common causes, ranked</h2>
<p>The list is short, and the top three cover most cases.</p>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Cause</th>
            <th scope="col">How often</th>
            <th scope="col">Fastest check</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>All GPUs already requested</td>
            <td>Very common</td>
            <td>Step 2</td>
        </tr>
        <tr>
            <td>Missing toleration</td>
            <td>Very common</td>
            <td>Step 3</td>
        </tr>
        <tr>
            <td>Selector label does not exist</td>
            <td>Common</td>
            <td>Step 4</td>
        </tr>
        <tr>
            <td>Enough GPUs in total, but fragmented</td>
            <td>Common for multi-GPU Pods</td>
            <td>Step 2</td>
        </tr>
        <tr>
            <td>CPU or memory too small on GPU nodes</td>
            <td>Occasional</td>
            <td>Step 5</td>
        </tr>
        <tr>
            <td>Wrong resource name after enabling MIG</td>
            <td>Occasional</td>
            <td>Step 2</td>
        </tr>
        <tr>
            <td>Namespace quota</td>
            <td>Occasional</td>
            <td>Step 6</td>
        </tr>
        <tr>
            <td>Volume in the wrong zone</td>
            <td>Occasional</td>
            <td>Step 7</td>
        </tr>
    </tbody>
  </table>
</div>
<h2 id="practice-without-a-gpu">Practice without a GPU</h2>
<p>Every step here works on fake GPUs. The <a href="https://vishctl.dev/posts/simulate-gpu-vllm-llm-d-on-laptop/">laptop GPU simulation lab</a> gives you a kind cluster that advertises 16 simulated H100s. Request 17, add a taint, or misspell a selector, and you can produce each of these Pending states on purpose and practice reading the events.</p>
<h2 id="cheat-sheet">Cheat sheet</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Pending             = no node passed every scheduling rule yet
</span></span><span class="line"><span class="cl">Pod events          = where the scheduler explains itself; always read these first
</span></span><span class="line"><span class="cl">Insufficient gpu    = not enough free GPUs on that node
</span></span><span class="line"><span class="cl">Allocatable         = how many GPUs a node offers in total
</span></span><span class="line"><span class="cl">Fragmentation       = enough free GPUs overall, but not enough on any single node
</span></span><span class="line"><span class="cl">Taint               = a node&#39;s &#34;keep out&#34; sign
</span></span><span class="line"><span class="cl">Toleration          = a Pod&#39;s pass for a taint; allows, does not attract
</span></span><span class="line"><span class="cl">Node selector       = a Pod&#39;s own restriction on where it will run
</span></span><span class="line"><span class="cl">ResourceQuota       = a per-namespace cap; over it, the Pod is never created
</span></span><span class="line"><span class="cl">Volume zone conflict = the disk and the free GPU are in different zones
</span></span><span class="line"><span class="cl">PriorityClass       = lets important Pods preempt less important ones
</span></span><span class="line"><span class="cl">TriggeredScaleUp    = the cluster autoscaler is adding a node; waiting is normal
</span></span><span class="line"><span class="cl">Rule of thumb       = read the event, then find the one rule that leaves zero nodes
</span></span></code></pre></div><p>Once the Pod is running, the next question is how long it takes to become ready, which is the subject of <a href="https://vishctl.dev/posts/vllm-cold-start-model-cache-kubernetes/">Faster vLLM Cold Starts on Kubernetes</a>. For the layers beneath scheduling, go back to the <a href="https://vishctl.dev/posts/kubernetes-gpu-platform-engineering/">GPU platform guide</a>.</p>
]]></content:encoded></item></channel></rss>