You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/azure-kubernetes/availability-performance/troubleshoot-pod-scheduling-errors.md
+22-15Lines changed: 22 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
ms.date: 06/30/2025
5
5
ms.reviewer:
6
6
ms.service: azure-kubernetes-service
@@ -9,17 +9,17 @@ ms.custom: sap:Node/node pool availability and performance
9
9
10
10
# Troubleshoot pod scheduler errors in AKS
11
11
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.
13
13
14
14
## Error: 0/(X) nodes are available: X node(s) had volume node affinity conflict
15
15
16
-
Pods remain in the Pending state with the scheduler message:
16
+
Pods remain in the Pending state with the following scheduler error:
17
17
18
18
>0/(X) nodes are available: X node(s) had volume node affinity conflict.
19
19
20
20
### Cause
21
21
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.
23
23
24
24
### Solution
25
25
@@ -33,8 +33,8 @@ Persistent Volumes can define nodeAffinity rules that restrict which nodes can a
33
33
```bash
34
34
kubectl get nodes --show-labels
35
35
```
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:
38
38
39
39
```bash
40
40
kubectl label nodes <node-name> <key>=<value>
@@ -45,7 +45,7 @@ Persistent Volumes can define nodeAffinity rules that restrict which nodes can a
45
45
46
46
## Error: 0/(X) nodes are available: X Insufficient CPU
47
47
48
-
Pods remain in the Pending state with the scheduler message:
48
+
Pods remain in the Pending state with the scheduler error:
49
49
50
50
>Error: 0/(X) nodes are available: X Insufficient CPU.
51
51
@@ -54,18 +54,18 @@ Pods remain in the Pending state with the scheduler message:
54
54
This issue occurs when one or more of the following conditions are met:
55
55
56
56
- 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.
58
58
- The node pools lack sufficient resources or have incorrect configuration settings.
59
59
60
60
### Solution
61
61
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.
63
63
64
64
```bash
65
65
kubectl describe pod <pod-name>
66
66
kubectl describe nodes
67
67
```
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:
69
69
70
70
```bash
71
71
@@ -75,12 +75,12 @@ This issue occurs when one or more of the following conditions are met:
75
75
--name <nodepool-name> \
76
76
--node-count <desired-node-count>
77
77
```
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 ifany scheduling constraints are restricting pod placement across available nodes.
80
80
81
81
## Error: 0/(X) nodes are available: X node(s) had untolerated taint
82
82
83
-
Pods remain in the Pending state with the scheduler message:
83
+
Pods remain in the Pending state with the error:
84
84
85
85
>Error: 0/(X) nodes are available: X node(s) had untolerated taint.
86
86
@@ -98,7 +98,7 @@ The Kubernetes scheduler tries to assign the Pod to a node, but all nodes are re
98
98
```bash
99
99
kubectl get nodes -o json | jq '.items[].spec.taints'
100
100
```
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:
102
102
103
103
```yml
104
104
tolerations:
@@ -111,7 +111,7 @@ The Kubernetes scheduler tries to assign the Pod to a node, but all nodes are re
111
111
112
112
effect: "NoSchedule"
113
113
```
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:
115
115
116
116
```bash
117
117
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
121
121
```bash
122
122
kubectl get pods -o wide
123
123
```
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)
0 commit comments