Skip to content

Commit 9a3ba86

Browse files
committed
add references
1 parent 2786007 commit 9a3ba86

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

support/azure/azure-kubernetes/availability-performance/troubleshoot-pod-scheduling-errors.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Troubleshoot Pod scheduler Errors in AKS
3-
description: Explains common scheduling errors, their causes, and how to resolve them.
3+
description: Explains common scheduler errors, their causes, and how to resolve them.
44
ms.date: 06/30/2025
55
ms.reviewer:
66
ms.service: azure-kubernetes-service
@@ -9,17 +9,17 @@ ms.custom: sap:Node/node pool availability and performance
99

1010
# Troubleshoot pod scheduler errors in AKS
1111

12-
When you deploy workloads in Azure Kubernetes Service (AKS), you might encounter scheduling errors that prevent Pods from running. This article explains common scheduling errors, their causes, and how to resolve them.
12+
When you deploy workloads in Azure Kubernetes Service (AKS), you might encounter scheduler errors that prevent Pods from running. This article provides solutions to common scheduler errors.
1313

1414
## Error: 0/(X) nodes are available: X node(s) had volume node affinity conflict
1515

16-
Pods remain in the Pending state with the scheduler message:
16+
Pods remain in the Pending state with the following scheduler error:
1717

1818
>0/(X) nodes are available: X node(s) had volume node affinity conflict.
1919
2020
### Cause
2121

22-
Persistent Volumes can define nodeAffinity rules that restrict which nodes can access the volume. If no node matches these rules, the Pod can't be scheduled.
22+
[Persistent Volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#node-affinity) define `nodeAffinity rules` that restrict which nodes can access the volume. If none of the available nodes satisfy the volume's affinity rules, the scheduler cannot assign the Pod to any node.
2323

2424
### Solution
2525

@@ -33,8 +33,8 @@ Persistent Volumes can define nodeAffinity rules that restrict which nodes can a
3333
```bash
3434
kubectl get nodes --show-labels
3535
```
36-
3. Align node affinity with node labels by ensuring at least one node has labels that match the PV's nodeAffinity.
37-
4. Update the PV or node labels:
36+
3. Make sure that at least one node's labels match the `nodeAffinity` specified in the Persistent Volume's YAML spec.
37+
4. To resolve the conflict, Update the Persistent Volume's affinity rules to match existing node labels or add the required labels to the correct node:
3838
3939
```bash
4040
kubectl label nodes <node-name> <key>=<value>
@@ -45,7 +45,7 @@ Persistent Volumes can define nodeAffinity rules that restrict which nodes can a
4545

4646
## Error: 0/(X) nodes are available: X Insufficient CPU
4747

48-
Pods remain in the Pending state with the scheduler message:
48+
Pods remain in the Pending state with the scheduler error:
4949

5050
>Error: 0/(X) nodes are available: X Insufficient CPU.
5151

@@ -54,18 +54,18 @@ Pods remain in the Pending state with the scheduler message:
5454
This issue occurs when one or more of the following conditions are met:
5555

5656
- All node resources are in use.
57-
- Pod's CPU request exceeds available capacity.
57+
- The pending Pod's resource requests exceed available CPU on the nodes.
5858
- The node pools lack sufficient resources or have incorrect configuration settings.
5959
6060
### Solution
6161
62-
1. Check resource usage and Pod requirements:
62+
1. Review CPU usage on all nodes and verify if there is enough unallocated CPU to meet the pod's request.
6363

6464
```bash
6565
kubectl describe pod <pod-name>
6666
kubectl describe nodes
6767
```
68-
2. Scale the node pool:
68+
2. If no node has enough CPU, increase the number of nodes or use larger VM sizes in the node pool
6969

7070
```bash
7171
@@ -75,12 +75,12 @@ This issue occurs when one or more of the following conditions are met:
7575
  --name <nodepool-name> \
7676
  --node-count <desired-node-count>
7777
```
78-
3. Optimize Pod resource requests. Make sure that CPU requests and limits are appropriate for your node sizes.
79-
4. Review taints and affinity rules. Check if other scheduling constraints are preventing placement.
78+
3. Optimize Pod resource requests. Make sure that CPU requests and limits are appropriate for your node sizes.
79+
4. Verify if any scheduling constraints are restricting pod placement across available nodes.
8080

8181
## Error: 0/(X) nodes are available: X node(s) had untolerated taint
8282

83-
Pods remain in the Pending state with the scheduler message:
83+
Pods remain in the Pending state with the error:
8484

8585
>Error: 0/(X) nodes are available: X node(s) had untolerated taint.
8686

@@ -98,7 +98,7 @@ The Kubernetes scheduler tries to assign the Pod to a node, but all nodes are re
9898
```bash
9999
 kubectl get nodes -o json | jq '.items[].spec.taints'
100100
```
101-
2. Add necessary tolerations to Pod spec. Edit your deployment or Pod YAML to include matching tolerations for the taints on your nodes. For example, if your node has the taint key=value:NoSchedule, your Pod spec must include:
101+
2. Add necessary tolerations to Pod spec: Edit your deployment or Pod YAML to include matching tolerations for the taints on your nodes. For example, if your node has the taint key=value:NoSchedule, your Pod spec must include:
102102
103103
```yml
104104
tolerations:
@@ -111,7 +111,7 @@ The Kubernetes scheduler tries to assign the Pod to a node, but all nodes are re
111111
112112
  effect: "NoSchedule"
113113
```
114-
3. If the taint isn't needed, you can remove it from the node:
114+
If the taint isn't needed, you can remove it from the node:
115115

116116
```bash
117117
kubectl taint nodes <node-name> <key>:<effect>-
@@ -121,3 +121,10 @@ The Kubernetes scheduler tries to assign the Pod to a node, but all nodes are re
121121
```bash
122122
kubectl get pods -o wide
123123
```
124+
## Reference
125+
126+
- [Kubernetes: Use Azure Disks with Azure Kubernetes Service (AKS)](/azure/aks/azure-disks-dynamic-pv)
127+
- [Troubleshoot pod deployment issues in Azure Kubernetes Service (AKS)](/azure/aks/operator-best-practices-cluster-management#troubleshoot-pod-deployment-issues)
128+
- [Kubernetes Documentation: Insufficient CPU](https://kubernetes.io/docs/concepts/scheduling-eviction/resource-bin-packing/#insufficient-resource)
129+
- [Kubernetes: Taints and Tolerations](https://learn.microsoft.com/en-us/azure/aks/node-taints)
130+
- [Assign and Schedule Pods with Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)

0 commit comments

Comments
 (0)