{"id":3484,"date":"2026-12-04T12:28:30","date_gmt":"2026-12-04T12:28:30","guid":{"rendered":"https:\/\/www.rajeshkumar.xyz\/blog\/?p=3484"},"modified":"2026-12-04T12:28:32","modified_gmt":"2026-12-04T12:28:32","slug":"pending-pods-a-scheduler-diagnosis-checklist","status":"publish","type":"post","link":"https:\/\/www.rajeshkumar.xyz\/blog\/pending-pods-a-scheduler-diagnosis-checklist\/","title":{"rendered":"Pending Pods: A Scheduler Diagnosis Checklist"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Kubernetes Pod can remain in <code>Pending<\/code> for several different reasons. Sometimes the scheduler cannot find a suitable node. In other cases, the scheduler has already selected a node, but the Pod is waiting for storage, container images or runtime setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These situations need different troubleshooting steps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first task is to identify whether the Pod is actually waiting for scheduling. Do not immediately reduce CPU requests, remove node taints or restart cluster components.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start with <code>kubectl describe pod<\/code>. Read the scheduling events and check the <code>PodScheduled<\/code> condition. These two checks help identify where the deployment process is blocked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide provides a practical scheduler diagnosis checklist. It covers resource shortages, node constraints, taints, affinity, storage binding, scheduling gates and custom schedulers. It also explains which problems happen after scheduling and should not be mistaken for scheduler failures.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Does Pending Mean in Kubernetes?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Pending<\/code> is a Pod lifecycle phase. It means Kubernetes has accepted the Pod, but one or more containers have not been fully set up and made ready to run.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This phase includes time spent waiting for a node and time spent downloading container images.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, seeing <code>Pending<\/code> does not automatically mean that <code>kube-scheduler<\/code> has failed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start by checking the Pod conditions.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Observation<\/th><th>What it indicates<\/th><th>Where to investigate<\/th><\/tr><tr><td><code>PodScheduled=False<\/code><\/td><td>The Pod has not been assigned to a node<\/td><td>Scheduler events and scheduling constraints<\/td><\/tr><tr><td><code>PodScheduled=True<\/code><\/td><td>The scheduler has assigned the Pod<\/td><td>Kubelet, storage, container runtime and networking<\/td><\/tr><tr><td><code>spec.nodeName<\/code> is empty<\/td><td>No node is assigned<\/td><td>Scheduling or scheduling gates<\/td><\/tr><tr><td><code>spec.nodeName<\/code> contains a node<\/td><td>A node has been selected<\/td><td>Node-level startup issues<\/td><\/tr><tr><td><code>SchedulingGated<\/code><\/td><td>The Pod is waiting for scheduling gates to be removed<\/td><td>The component responsible for those gates<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Kubernetes Pod lifecycle documentation explains that a Pod can remain in the Pending phase while images download. The <code>PodScheduled<\/code> condition provides a better way to distinguish scheduling from later startup work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Official reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/pod-lifecycle\/\">Kubernetes Pod Lifecycle<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Capture the Pod&#8217;s Current State<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start with the affected namespace and Pod name.<\/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\">NS=<span class=\"hljs-keyword\">default<\/span>\nPOD=my-app<span class=\"hljs-number\">-7<\/span>c8f9d7b6f-abcde<\/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\">Replace these example values with your actual Pod details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the Pod:<\/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 get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o wide<\/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\">Inspect its complete description:<\/p>\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 describe pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span><\/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\">Review the Pod conditions:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> pod \"$POD\" -n \"$NS\" -o jsonpath='{range .status.conditions&#91;*]}{.type}={.status}{<span class=\"hljs-string\">\" reason=\"<\/span>}{.reason}{<span class=\"hljs-string\">\" message=\"<\/span>}{.message}{<span class=\"hljs-string\">\"\\n\"<\/span>}{end}<span class=\"hljs-string\">'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><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 its scheduler, assigned node and scheduling gates:<\/p>\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> pod \"$POD\" -n \"$NS\" -o jsonpath='scheduler={.spec.schedulerName}{<span class=\"hljs-string\">\"\\n\"<\/span>}node={.spec.nodeName}{<span class=\"hljs-string\">\"\\n\"<\/span>}gates={.spec.schedulingGates}{<span class=\"hljs-string\">\"\\n\"<\/span>}<span class=\"hljs-string\">'<\/span><\/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\">Finally, inspect recent namespace events:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" 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> --sort-by=<span class=\"hljs-string\">'.metadata.creationTimestamp'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><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\"><strong>What are you looking for?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pay particular attention to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>FailedScheduling<\/code><\/li>\n\n\n\n<li><code>Scheduled<\/code><\/li>\n\n\n\n<li><code>Insufficient cpu<\/code><\/li>\n\n\n\n<li><code>Insufficient memory<\/code><\/li>\n\n\n\n<li><code>untolerated taint<\/code><\/li>\n\n\n\n<li><code>node(s) didn't match Pod's node affinity<\/code><\/li>\n\n\n\n<li><code>unbound immediate PersistentVolumeClaims<\/code><\/li>\n\n\n\n<li><code>Too many pods<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The event message usually provides a more useful starting point than the displayed Pending status.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Understand How the Kubernetes Scheduler Works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default Kubernetes scheduler selects a suitable node for each Pod that needs scheduling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its main decision process has two important stages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filtering<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The scheduler checks which nodes satisfy the Pod&#8217;s requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It evaluates factors such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Available resources<\/li>\n\n\n\n<li>Node selectors<\/li>\n\n\n\n<li>Node affinity<\/li>\n\n\n\n<li>Pod affinity and anti-affinity<\/li>\n\n\n\n<li>Taints and tolerations<\/li>\n\n\n\n<li>Persistent storage constraints<\/li>\n\n\n\n<li>Pod topology spread requirements<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Nodes that fail required constraints are removed from consideration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scoring<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The scheduler ranks the nodes that pass filtering.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It uses configured scheduling rules to decide which suitable node is the best placement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The highest-scoring feasible node is selected, and the Pod is bound to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The important diagnostic distinction is this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Filtering determines whether a node is suitable. Scoring helps choose among suitable nodes.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If no node passes filtering, the Pod remains unscheduled. Changing a scoring preference will not solve a hard scheduling restriction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/kube-scheduler\/\">Kubernetes Scheduler<\/a> and <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/scheduling-framework\/\">Scheduling Framework<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Check Whether Nodes Are Ready and Schedulable<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Pod cannot be scheduled when no available node satisfies its requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List the nodes:<\/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> nodes<\/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\">Inspect a particular node:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl describe node <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">node-name<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check the node conditions, taints, allocatable resources and scheduling status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Ready=False<\/code><\/li>\n\n\n\n<li><code>Ready=Unknown<\/code><\/li>\n\n\n\n<li><code>SchedulingDisabled<\/code><\/li>\n\n\n\n<li><code>MemoryPressure<\/code><\/li>\n\n\n\n<li><code>DiskPressure<\/code><\/li>\n\n\n\n<li><code>PIDPressure<\/code><\/li>\n\n\n\n<li><code>node.kubernetes.io\/unschedulable<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A cordoned node is marked unschedulable. The scheduler will not place ordinary new Pods on it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can inspect all node labels with:<\/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 <span class=\"hljs-keyword\">get<\/span> nodes --show-labels<\/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\">You can also check which Pods already occupy the nodes:<\/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 <span class=\"hljs-keyword\">get<\/span> pods -A -o wide<\/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<h3 class=\"wp-block-heading\">How to Fix This Problem<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Do not uncordon every node automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First confirm why the node was marked unschedulable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If maintenance has finished and the node is healthy, an authorised administrator can make it schedulable again:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl uncordon <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">node-name<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If a node is genuinely unhealthy, investigate the underlying node or cloud infrastructure problem instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Check CPU and Memory Requests<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Insufficient resources are among the most common reasons for <code>FailedScheduling<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A typical event may look like this:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">Warning  FailedScheduling\n0\/4 nodes are available: 4 Insufficient cpu<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This means the scheduler could not find a suitable node with enough CPU capacity for the Pod&#8217;s effective request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the Pod&#8217;s resources:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o yaml<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><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<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\">resources:\n  requests:\n    cpu: <span class=\"hljs-string\">\"500m\"<\/span>\n    <span class=\"hljs-attr\">memory<\/span>: <span class=\"hljs-string\">\"512Mi\"<\/span>\n  <span class=\"hljs-attr\">limits<\/span>:\n    cpu: <span class=\"hljs-string\">\"1\"<\/span>\n    <span class=\"hljs-attr\">memory<\/span>: <span class=\"hljs-string\">\"1Gi\"<\/span><\/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\">In this example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>500m<\/code> means half a CPU core.<\/li>\n\n\n\n<li><code>512Mi<\/code> means 512 mebibytes of memory.<\/li>\n\n\n\n<li><code>1<\/code> CPU means one CPU core.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Next, inspect node capacity and allocated resources:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl describe node <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">node-name<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Pay attention to these sections:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Capacity<\/li>\n\n\n\n<li>Allocatable<\/li>\n\n\n\n<li>Allocated resources<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The scheduler uses resource requests for placement decisions. It does not simply look at the live CPU or memory usage displayed by a monitoring dashboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a node might appear to have low CPU usage while its requested CPU capacity is already committed to existing Pods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The scheduler can reject another Pod even when the CPU graph appears mostly idle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check Effective Pod Requests<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Do not inspect only the main application containers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Init containers, sidecars and Pod overhead can affect the effective request used for scheduling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For some Pods, the effective request is not simply the total of every container request. Kubernetes calculates the requirements across initialization and normal execution phases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/resource-management\/effective-pod-requests-limits\/\">Effective Pod Requests and Limits<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Fix Resource Problems<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Consider these options:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Review whether the application&#8217;s resource requests reflect measured needs.<\/li>\n\n\n\n<li>Remove unnecessary workloads from the relevant node pool.<\/li>\n\n\n\n<li>Add suitable nodes when cluster capacity is insufficient.<\/li>\n\n\n\n<li>Adjust resource requests only when testing supports the change.<\/li>\n\n\n\n<li>Check whether a Pod requests more resources than any available node can provide.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Do not reduce memory requests simply to force a Pod onto a node. That can create memory pressure and operational instability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also inspect <code>ephemeral-storage<\/code> and extended resources such as GPUs when the event mentions them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Inspect Node Taints and Pod Tolerations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes uses taints to prevent unsuitable Pods from scheduling onto certain nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a node may have this taint:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dedicated=gpu:NoSchedule<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">A Pod without a matching toleration cannot normally be scheduled onto that node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the node:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl describe node <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">node-name<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Find the <code>Taints<\/code> section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the Pod:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o yaml<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><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\">Review its tolerations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A matching toleration could look like this:<\/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\">tolerations:\n  - key: <span class=\"hljs-string\">\"dedicated\"<\/span>\n    <span class=\"hljs-attr\">operator<\/span>: <span class=\"hljs-string\">\"Equal\"<\/span>\n    <span class=\"hljs-attr\">value<\/span>: <span class=\"hljs-string\">\"gpu\"<\/span>\n    <span class=\"hljs-attr\">effect<\/span>: <span class=\"hljs-string\">\"NoSchedule\"<\/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\">A toleration allows the Pod to tolerate a matching taint. It does not guarantee that the Pod will be placed on that node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Pod must still satisfy the other scheduling requirements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Understand the Common Taint Effects<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Effect<\/th><th>Scheduling behaviour<\/th><\/tr><tr><td><code>NoSchedule<\/code><\/td><td>Does not allow new non-tolerating Pods to schedule<\/td><\/tr><tr><td><code>PreferNoSchedule<\/code><\/td><td>Tries to avoid the node when possible<\/td><\/tr><tr><td><code>NoExecute<\/code><\/td><td>Can prevent scheduling and evict non-tolerating Pods already running<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Do not remove a security or workload-isolation taint just to make one Pod run.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First confirm the intended node-pool design.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/taint-and-toleration\/\">Kubernetes Taints and Tolerations<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Verify Node Selectors and Node Affinity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node selectors and node affinity restrict where a Pod can run.<\/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\">nodeSelector:\n  disktype: ssd<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This Pod requires a node with the label:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">disktype=ssd<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check whether the expected label exists:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> nodes --show-labels<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><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 no node has the correct label, the Pod cannot satisfy this requirement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check Required Node Affinity<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A required node affinity rule is a hard scheduling requirement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">affinity:\n  nodeAffinity:\n    requiredDuringSchedulingIgnoredDuringExecution:\n      nodeSelectorTerms:\n        - matchExpressions:\n            - key: environment\n              operator: In\n              values:\n                - production<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The Pod needs a matching node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the cluster uses the label <code>environment=staging<\/code>, this rule will not match.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Required Versus Preferred Affinity<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Rule<\/th><th>Behaviour<\/th><\/tr><tr><td><code>requiredDuringSchedulingIgnoredDuringExecution<\/code><\/td><td>Required for scheduling<\/td><\/tr><tr><td><code>preferredDuringSchedulingIgnoredDuringExecution<\/code><\/td><td>Used as a scheduling preference<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A preferred rule alone should not normally make a Pod impossible to schedule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the complete Pod specification before editing its affinity rules.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/assign-pod-node\/\">Assigning Pods to Nodes<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Check Pod Affinity, Anti-Affinity and Topology Spread<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some applications require Pods to run near other workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Others require replicas to remain separated across nodes or availability zones.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes supports these requirements through:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pod affinity<\/li>\n\n\n\n<li>Pod anti-affinity<\/li>\n\n\n\n<li>Topology spread constraints<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A required Pod anti-affinity rule can prevent scheduling when every suitable node already hosts a matching Pod.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a workload may require one replica per node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If all eligible nodes already have a matching replica, another Pod may remain unscheduled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Topology spread constraints can also create scheduling restrictions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consider:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">topologySpreadConstraints:\n  - maxSkew: 1\n    topologyKey: topology.kubernetes.io\/zone\n    whenUnsatisfiable: DoNotSchedule\n    labelSelector:\n      matchLabels:\n        app: web<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This rule requires the matching Pods to remain balanced across eligible zones.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the distribution would violat<code>maxSkew<\/code>, the scheduler cannot place the incoming Pod under this hard constraint.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What to Inspect<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Are all required topology labels present?<\/li>\n\n\n\n<li>Does the label selector match the intended Pods?<\/li>\n\n\n\n<li>Is the namespace correct?<\/li>\n\n\n\n<li>Is the <code>topologyKey<\/code> valid?<\/li>\n\n\n\n<li>Is <code>maxSkew<\/code> too restrictive for the current cluster?<\/li>\n\n\n\n<li>Does <code>DoNotSchedule<\/code> prevent the available placement?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Changing <code>DoNotSchedule<\/code> to <code>ScheduleAnyway<\/code> changes the placement guarantee. Do this only after understanding the availability trade-off.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/topology-spread-constraints\/\">Pod Topology Spread Constraints<\/a> and <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/assign-pod-node\/\">Assigning Pods to Nodes<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 8: Investigate PersistentVolumeClaim Problems<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Storage can affect Pod scheduling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A common event is:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">pod has unbound immediate PersistentVolumeClaims<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Start by checking the claims:<\/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> pvc -n \"$NS\"<\/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\">Inspect a specific claim:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-20\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl describe pvc <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">pvc-name<\/span>&gt;<\/span> -n \"$NS\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-20\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check available PersistentVolumes:<\/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> pv<\/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\">Review the StorageClass:<\/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 <span class=\"hljs-keyword\">get<\/span> storageclass<\/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\">Look for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PVC in <code>Pending<\/code><\/li>\n\n\n\n<li>Missing StorageClass<\/li>\n\n\n\n<li>Incorrect storage class name<\/li>\n\n\n\n<li>Insufficient storage capacity<\/li>\n\n\n\n<li>Volume access mode mismatch<\/li>\n\n\n\n<li>PV node affinity restrictions<\/li>\n\n\n\n<li>Provisioner errors<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Understand WaitForFirstConsumer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Pending PVC is not always a storage failure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some StorageClasses use:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-23\" data-shcb-language-name=\"HTTP\" data-shcb-language-slug=\"http\"><span><code class=\"hljs language-http\"><span class=\"hljs-attribute\">volumeBindingMode<\/span>: WaitForFirstConsumer<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-23\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTTP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">http<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This delays volume provisioning and binding until a Pod using the claim is scheduled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes then considers the storage and node placement together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this situation, the PVC may remain Pending while the scheduler evaluates the Pod&#8217;s placement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not force-bind the claim or delete storage resources before checking the StorageClass behaviour.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/reference\/kubernetes-api\/storage\/storage-class-v1\/\">StorageClass API<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 9: Check Scheduling Gates<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Pod may remain outside normal scheduling because it has scheduling gates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect them:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-24\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o jsonpath=<span class=\"hljs-string\">'{.spec.schedulingGates}'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-24\"><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\">A scheduling gate is an explicit condition that must be removed before the Pod becomes eligible for scheduling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This feature allows another component to control when a Pod is ready for scheduling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a workload controller may create several Pods and remove their gates only after a preparation step is complete.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Fix This Problem<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Find the component responsible for the scheduling gate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check whether its prerequisite has completed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not simply remove all scheduling gates without understanding why they exist.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/pod-scheduling-readiness\/\">Pod Scheduling Readiness<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 10: Verify the Scheduler Name<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes normally uses the <code>default-scheduler<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, a Pod can request a different scheduler through:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">spec:\n  schedulerName: custom-scheduler<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If the specified scheduler is not running or is not configured to handle the Pod, it may remain Pending.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the scheduler name:<\/p>\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> pod \"$POD\" -n \"$NS\" -o jsonpath='{.spec.schedulerName}{<span class=\"hljs-string\">\"\\n\"<\/span>}<span class=\"hljs-string\">'<\/span><\/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\">If the result is <code>default-scheduler<\/code>, inspect the default scheduler.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If it shows a custom name, confirm:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The scheduler process is running.<\/li>\n\n\n\n<li>Its configuration includes the required profile.<\/li>\n\n\n\n<li>Its scheduler name matches the Pod specification.<\/li>\n\n\n\n<li>It watches the correct cluster resources.<\/li>\n\n\n\n<li>Its scheduling events and logs show activity.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not replace a custom scheduler name with <code>default-scheduler<\/code> unless the workload is intended to use that scheduler.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/running-multiple-schedulers\/\">Running Multiple Schedulers<\/a> and <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/extend-kubernetes\/configure-multiple-schedulers\/\">Configure Multiple Schedulers<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 11: Review Priority and Preemption<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes supports Pod priority.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a higher-priority Pod cannot be scheduled, the scheduler may try to preempt lower-priority Pods to create room.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the Pod:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-26\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o yaml<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-26\"><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<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-27\" data-shcb-language-name=\"HTTP\" data-shcb-language-slug=\"http\"><span><code class=\"hljs language-http\"><span class=\"hljs-attribute\">priorityClassName<\/span>: production-critical<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-27\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTTP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">http<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check available PriorityClasses:<\/p>\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> priorityclass<\/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\">Preemption is not guaranteed to solve every scheduling problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, evicting a lower-priority Pod does not automatically fix a node selector mismatch, an incompatible GPU requirement or every storage constraint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Increasing priority without a workload design reason can also disrupt other services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/scheduling-eviction\/pod-priority-preemption\/\">Pod Priority and Preemption<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 12: Distinguish Scheduler Failures From Later Startup Problems<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This distinction prevents wasted troubleshooting work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Pod can remain in the Pending lifecycle phase even after it has been assigned to a node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-29\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">kubectl get pod <span class=\"hljs-string\">\"$POD\"<\/span> -n <span class=\"hljs-string\">\"$NS\"<\/span> -o wide<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-29\"><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\">If a node is assigned and <code>PodScheduled=True<\/code>, investigate the startup process.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Event or symptom<\/th><th>Likely area to investigate<\/th><\/tr><tr><td><code>ErrImagePull<\/code><\/td><td>Image name, registry or authentication<\/td><\/tr><tr><td><code>ImagePullBackOff<\/code><\/td><td>Image retrieval and registry access<\/td><\/tr><tr><td><code>FailedMount<\/code><\/td><td>Volume and storage mounting<\/td><\/tr><tr><td><code>FailedCreatePodSandBox<\/code><\/td><td>Container runtime or CNI networking setup<\/td><\/tr><tr><td>Init container failure<\/td><td>Init container command, dependencies or mounted files<\/td><\/tr><tr><td>Container stuck in <code>ContainerCreating<\/code><\/td><td>Image, volume, sandbox or runtime setup<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These are not all scheduler filter failures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DNS problems generally occur when a container or application tries to resolve a name. They are not a reason to change node affinity or resource requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also distinguish ResourceQuota failures from scheduling failures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a new resource violates a namespace quota, the API server rejects the request with <code>403 Forbidden<\/code>. In a Deployment, this may appear as a ReplicaSet failing to create the requested Pod rather than an existing Pod failing scheduler placement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/pod-condition\/\">Pod Conditions<\/a> and <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/resource-quotas\/\">Resource Quotas<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Practical Scheduler Event Diagnosis Table<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following table when reading <code>kubectl describe pod<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Event message<\/th><th>Likely cause<\/th><th>First check<\/th><\/tr><tr><td><code>Insufficient cpu<\/code><\/td><td>CPU requests exceed available allocatable capacity<\/td><td>Node allocated resources<\/td><\/tr><tr><td><code>Insufficient memory<\/code><\/td><td>Memory request cannot fit<\/td><td>Node memory allocation<\/td><\/tr><tr><td><code>Insufficient ephemeral-storage<\/code><\/td><td>Storage request cannot fit<\/td><td>Node allocatable ephemeral storage<\/td><\/tr><tr><td><code>Too many pods<\/code><\/td><td>Node Pod limit reached<\/td><td>Node allocatable Pod count<\/td><\/tr><tr><td><code>untolerated taint<\/code><\/td><td>Missing or incorrect toleration<\/td><td>Node taints and Pod tolerations<\/td><\/tr><tr><td><code>didn't match node selector<\/code><\/td><td>Required node label is missing<\/td><td>Node labels and <code>nodeSelector<\/code><\/td><\/tr><tr><td><code>didn't match Pod's node affinity<\/code><\/td><td>Required affinity does not match<\/td><td>Affinity expressions<\/td><\/tr><tr><td><code>pod has unbound immediate PersistentVolumeClaims<\/code><\/td><td>Immediate volume binding is incomplete<\/td><td>PVC and StorageClass<\/td><\/tr><tr><td><code>didn't match pod topology spread constraints<\/code><\/td><td>Hard topology constraint prevents placement<\/td><td>Topology labels and <code>maxSkew<\/code><\/td><\/tr><tr><td>No scheduler event with a named scheduler<\/td><td>Custom scheduler may not be processing the Pod<\/td><td><code>schedulerName<\/code> and scheduler health<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A single event can report several reasons because different nodes may fail different scheduling requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/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\"><span class=\"hljs-number\">0<\/span>\/<span class=\"hljs-number\">4<\/span> nodes are available:\n<span class=\"hljs-number\">2<\/span> Insufficient cpu,\n<span class=\"hljs-number\">1<\/span> node(s) had untolerated taint,\n<span class=\"hljs-number\">1<\/span> node(s) didn<span class=\"hljs-string\">'t match Pod'<\/span>s node affinity<\/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\">This does not mean that one node has all three problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It means the candidate nodes were rejected for different reasons. Inspect each node and the Pod specification before choosing a fix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Reusable Kubernetes Pending Pod Checklist<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use this checklist during an incident or deployment investigation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pod State<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm namespace and Pod name.<\/li>\n\n\n\n<li>Run <code>kubectl describe pod<\/code>.<\/li>\n\n\n\n<li>Inspect the <code>PodScheduled<\/code> condition.<\/li>\n\n\n\n<li>Check whether <code>spec.nodeName<\/code> is populated.<\/li>\n\n\n\n<li>Review recent Pod events.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Node Health<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm that eligible nodes are Ready.<\/li>\n\n\n\n<li>Check whether nodes are cordoned.<\/li>\n\n\n\n<li>Inspect node taints.<\/li>\n\n\n\n<li>Review node allocatable capacity.<\/li>\n\n\n\n<li>Check the maximum Pod count.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Scheduling Requirements<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Review CPU and memory requests.<\/li>\n\n\n\n<li>Review ephemeral-storage and extended resource requests.<\/li>\n\n\n\n<li>Inspect node selectors.<\/li>\n\n\n\n<li>Inspect required node affinity.<\/li>\n\n\n\n<li>Inspect Pod affinity and anti-affinity.<\/li>\n\n\n\n<li>Review topology spread constraints.<\/li>\n\n\n\n<li>Check toleration matching.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Storage<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check PersistentVolumeClaim status.<\/li>\n\n\n\n<li>Inspect available PersistentVolumes.<\/li>\n\n\n\n<li>Confirm the StorageClass.<\/li>\n\n\n\n<li>Review volume binding mode.<\/li>\n\n\n\n<li>Check volume topology requirements.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Scheduler Configuration<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check <code>schedulerName<\/code>.<\/li>\n\n\n\n<li>Inspect scheduling gates.<\/li>\n\n\n\n<li>Verify custom scheduler health when applicable.<\/li>\n\n\n\n<li>Review PriorityClass and preemption events.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">After Scheduling<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm <code>PodScheduled=True<\/code>.<\/li>\n\n\n\n<li>Check image-pulling events.<\/li>\n\n\n\n<li>Review volume-mount failures.<\/li>\n\n\n\n<li>Inspect sandbox and CNI setup.<\/li>\n\n\n\n<li>Review init container status.<\/li>\n\n\n\n<li>Inspect kubelet and runtime logs when needed.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Advanced Investigation: Check Scheduler Logs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If the Pod remains unscheduled but events do not explain the situation, inspect the scheduler itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a self-managed cluster, scheduler logs may be available through the control-plane node or the scheduler Pod, depending on how the cluster was installed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/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 <span class=\"hljs-keyword\">get<\/span> pods -n kube-system | grep scheduler<\/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\">If the scheduler is deployed as a Pod:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-32\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\">kubectl logs -n kube-system <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">scheduler-pod-name<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-32\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">On a systemd-based control-plane host, administrators may also inspect:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">journalctl -u kube-scheduler<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The exact location depends on the installation and distribution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For managed Kubernetes, use the cloud provider&#8217;s control-plane logging and diagnostic tools. You may not have direct access to scheduler logs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes provides a general guide to investigating control-plane components:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug\/debug-cluster\/\">Official Kubernetes Cluster Troubleshooting<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Troubleshooting Mistakes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Reducing resource requests without measuring application needs:<\/strong> This may make a Pod schedulable but can increase resource pressure later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Removing node taints without checking their purpose:<\/strong> Taints often protect dedicated or specialised node pools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Adding broad tolerations:<\/strong> A wildcard toleration can allow workloads onto nodes that should remain isolated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Changing affinity rules without checking labels:<\/strong> A label mismatch may be the real problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deleting PVCs to clear Pending:<\/strong> This can cause data loss or remove the storage object needed by the workload.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Restarting the scheduler before reading events:<\/strong> A component restart may hide symptoms without fixing the underlying constraint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Treating every Pending Pod as a scheduling failure:<\/strong> A scheduled Pod may still be downloading images or waiting for storage and runtime setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most reliable approach is to change one justified setting at a time and then verify the result.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Pending Pod is a symptom, not a complete diagnosis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start with the <code>PodScheduled<\/code> condition, inspect the scheduler events and determine whether a node has already been assigned.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then work through resource requests, taints, node affinity, Pod placement rules, storage and scheduler configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the scheduler has already assigned the Pod, move to node-level startup troubleshooting instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This simple distinction saves time and prevents unnecessary changes to a working Kubernetes cluster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A good scheduler diagnosis is based on evidence from the Pod, its events, the node and the workload specification\u2014not on guesses.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction A Kubernetes Pod can remain in Pending for several different reasons. Sometimes the scheduler cannot find a suitable node&#8230;. <\/p>\n","protected":false},"author":7,"featured_media":3485,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[735,713],"tags":[45,142,70,750,170,747,748,746,749,26],"series":[],"class_list":["post-3484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-devops-careers","tag-cloudnative","tag-devops","tag-devopsschool","tag-kubectl","tag-kubernetes","tag-kubernetestroubleshooting","tag-kubescheduler","tag-pendingpods","tag-podscheduling","tag-sre"],"_links":{"self":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3484","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=3484"}],"version-history":[{"count":1,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3484\/revisions"}],"predecessor-version":[{"id":3486,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3484\/revisions\/3486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media\/3485"}],"wp:attachment":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media?parent=3484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/categories?post=3484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/tags?post=3484"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/series?post=3484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}