Skip to content

Allow AKS nodepool upgrades from WS2022 to WS2025 - #10255

Merged
Julie Zhu (yanzhudd) merged 8 commits into
Azure:mainfrom
timmy-wright:timmy/wsupgrade
Aug 27, 2026
Merged

Allow AKS nodepool upgrades from WS2022 to WS2025#10255
Julie Zhu (yanzhudd) merged 8 commits into
Azure:mainfrom
timmy-wright:timmy/wsupgrade

Conversation

@timmy-wright

@timmy-wright Tim Wright (timmy-wright) commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate aks nodepool update cmd aks nodepool update update parameter os_sku: updated property choices from ['AzureContainerLinux', 'AzureLinux', 'AzureLinux3', 'AzureLinux3OSGuard', 'AzureLinuxOSGuard', 'Flatcar', 'Ubuntu', 'Ubuntu2204', 'Ubuntu2404', 'Ubuntu2604'] to ['AzureContainerLinux', 'AzureLinux', 'AzureLinux3', 'AzureLinux3OSGuard', 'AzureLinuxOSGuard', 'Flatcar', 'Ubuntu', 'Ubuntu2204', 'Ubuntu2404', 'Ubuntu2604', 'Windows2022', 'Windows2025']

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az aks nodepool update --os-sku, az aks create --os-sku/--enable-fips-image, az aks nodepool add --os-sku/--enable-fips-image

Summary

Allows upgrading an existing Windows node pool's OS SKU from Windows Server 2022 to Windows Server 2025 in place, and ensures Windows2025 node pools always run a FIPS-enabled OS image.

  • az aks nodepool update --os-sku now accepts Windows2022 and Windows2025 (previously only Linux SKUs were allowed on update), enabling in-place WS2022 → WS2025 upgrades.
  • az aks create and az aks nodepool add: --enable-fips-image is now required and always enabled when --os-sku is Windows2025, since Windows2025 requires a FIPS-enabled OS image. Passing --disable-fips-image together with --os-sku Windows2025 now raises an error instead of being silently accepted.
  • Updated help text and HISTORY.rst accordingly.
  • Added unit test coverage in test_validators.py and test_agentpool_decorator.py.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI lite review requested due to automatic review settings August 26, 2026 02:42
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Tim Wright (@timmy-wright),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@timmy-wright Tim Wright (timmy-wright) changed the title Timmy/wsupgrade Allow AKS nodepool upgrades from WS2022 to WS2025 Aug 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the aks-preview extension to allow az aks nodepool update --os-sku to accept Windows Server OS SKU values needed for in-place upgrades from Windows2022 to Windows2025, and documents/tests that support.

Changes:

  • Add Windows2022 and Windows2025 to the --os-sku enum allow-list for az aks nodepool update.
  • Update command help text to reflect Windows OS SKU default behavior (by Kubernetes version).
  • Add unit coverage asserting the update allow-list includes both Windows SKUs, and note the change in HISTORY.rst.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/aks-preview/HISTORY.rst Changelog entry describing the new Windows OS SKU options for nodepool update.
src/aks-preview/azext_aks_preview/tests/latest/test_validators.py Adds tests around OS SKU handling / allow-list for nodepool update.
src/aks-preview/azext_aks_preview/_params.py Extends node_os_skus_update to include Windows2022 and Windows2025.
src/aks-preview/azext_aks_preview/_help.py Updates --os-sku help text to mention Windows defaults by Kubernetes version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/aks-preview/azext_aks_preview/_help.py Outdated
Comment thread src/aks-preview/HISTORY.rst Outdated
Comment thread src/aks-preview/azext_aks_preview/tests/latest/test_validators.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/aks-preview/azext_aks_preview/_help.py:290

  • The updated help text still uses the abbreviation "k8s" and introduces a Kubernetes-version-based default that is inconsistent with the other --os-sku help entry in this file (around the aks nodepool add help still says the default is Windows2022). Please spell out "Kubernetes version" here for clarity, and consider aligning the default wording across the two help sections so users don’t get conflicting guidance.
        - name: --os-sku
          type: string
          short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, Ubuntu2604, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if k8s version is less than 1.37 or Windows2025 if k8s is 1.37 or greater.

Comment thread src/aks-preview/HISTORY.rst
Comment thread src/aks-preview/azext_aks_preview/_params.py
@yonzhan

Copy link
Copy Markdown
Collaborator

aks

@FumingZhang

Copy link
Copy Markdown
Member

The CI failures are unrelated to the changes in this PR. PR #10248 is helping fix the issues, so please rebase your branch on the latest main branch after #10248 is merged.

… update

Allows in-place OS SKU upgrades between Windows Server 2022 and 2025
on an existing node pool via `az aks nodepool update --os-sku`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that the default Windows os-sku depends on Kubernetes version:
Windows2022 for k8s < 1.36, Windows2025 for k8s >= 1.37.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add TestValidateOsSku covering validate_os_sku and the
node_os_skus_update choices list for az aks nodepool update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`az aks create` and `az aks nodepool add` now always enable
--enable-fips-image when --os-sku is Windows2025, since Windows2025
requires a FIPS-enabled OS image. --disable-fips-image cannot be
combined with --os-sku Windows2025 and raises an ArgumentUsageError.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@timmy-wright

Copy link
Copy Markdown
Contributor Author

The CI failures are unrelated to the changes in this PR. PR #10248 is helping fix the issues, so please rebase your branch on the latest main branch after #10248 is merged.

That PR has now merged, have rebased and force pushed.

@yanzhudd
Julie Zhu (yanzhudd) merged commit 680f402 into Azure:main Aug 27, 2026
24 checks passed
yaotongms pushed a commit to yaotongms/azure-cli-extensions that referenced this pull request Aug 28, 2026
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.

7 participants