Skip to content

Nap provisioning best practice blog#5665

Open
wdarko1 wants to merge 4 commits intoAzure:masterfrom
wdarko1:nap-provisioning-best-practice-blog
Open

Nap provisioning best practice blog#5665
wdarko1 wants to merge 4 commits intoAzure:masterfrom
wdarko1:nap-provisioning-best-practice-blog

Conversation

@wdarko1
Copy link
Contributor

@wdarko1 wdarko1 commented Mar 18, 2026

Adds a best practices blog for managing node selection, availability.

wdarko1 added 3 commits March 17, 2026 22:50
Add a new blog post on controlling node provisioning outcomes in AKS, covering PDBs, affinity, and topology spread constraints.
Updated language for clarity and precision in Kubernetes provisioning guidance. Enhanced explanations of key concepts and best practices for AKS Node Auto-Provisioning.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AKS blog post describing best practices for influencing node provisioning outcomes (PDBs, affinity/anti-affinity, and topology spread constraints) and how Node Auto-Provisioning (NAP) interprets those signals.

Changes:

  • Adds a new blog post markdown file for NAP/node provisioning best practices.
  • Includes examples and guidance for topology spread constraints, affinity, and Pod Disruption Budgets.
  • Describes NAP behavior for node selection, disruption, and topology spread.

Comment on lines +224 to +226
- Fix: Add PDBs that regulate disruption pace
- Fix: Consider adding [Consolidation Policies](https://learn.microsoft.com/en-us/azure/aks/node-auto-provisioning-disruption)
- Fix: Configure [Node Disruption Budgets](https://learn.microsoft.com/azure/aks/node-auto-provisioning-disruption#disruption-budgets) and/or enable a Maintennance Window using the [AKS Node OS Maintenance Schedule](https://learn.microsoft.com/azure/aks/node-auto-provisioning-upgrade-image#node-os-upgrade-maintenance-windows-for-nap)

<!-- truncate -->

![]()
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 03:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AKS blog post describing best practices for controlling node provisioning outcomes (PDBs, affinity/anti-affinity, topology spread constraints) and how AKS Node Auto-Provisioning (NAP) interprets those signals.

Changes:

  • Introduces a new best-practices post covering scheduling intent primitives (topology spread, affinity, PDBs).
  • Adds guidance on how NAP uses these constraints for node selection, scaling, and disruption/consolidation behaviors.

Cause: User has not set any guardrails on node disruption behavior.

- Fix: Add PDBs that regulate disruption pace
- Fix: Consider adding [Consolidation Policies](https://learn.microsoft.com/en-us/azure/aks/node-auto-provisioning-disruption)

<!-- truncate -->

![]()
Comment on lines +139 to +141
```YAML
affinity:
nodeAffinity:

Here's an example of a PDB that regulates disruption without blocking scale downs, upgrades, and consolidation:

```YAML
Comment on lines +249 to +252
NAP honors workload [topologyspreadconstraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#topologyspreadconstraints-field). While you can list the allowed zones in the NodePool CRD, `topologyspreadconstraints` are the means to ensure topology spread.

- NAP (**without** pod-level `topologyspreadconstraints` defined) will provision wherever there is availability for the preferred VM SKU. This can look like NAP provisioning all preferred nodes in zone 1 and none in zone 2 and zone 3.
- NAP (**with** pod-level `topologyspreadconstraints` defined) ensures topology spread. NAP honors pod-level constraints (number of replicas, topology spread behavior) in the workload deployment file. See the Kubernetes docs on topology spread for other examples also.
@@ -0,0 +1,253 @@
---
title: "Controlling Node Provisioning Outcomes on AKS: PDBs, Affinity, and Topology Spread (and what NAP does with them)"
@@ -0,0 +1,253 @@
---
title: "Controlling Node Provisioning Outcomes on AKS: PDBs, Affinity, and Topology Spread (and what NAP does with them)"
description: "Learn how Node auto provisioning and virtual machine node pools can address common capacity constraints when scaling an AKS cluster. Also learn best practices for compute scaling in AKS."
You typically implement this with node labels + nodeSelector / nodeAffinity (and often taints/tolerations if you want strong isolation).
Basic Example (with NodeSelector):

```YAML
Comment on lines +155 to +157
```YAML
topologySpreadConstraints:
- maxSkew: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants