Skip to content

{AKS} Add support for provisioning secondary network interfaces in node pool#9886

Open
jumpinthefire wants to merge 7 commits into
Azure:mainfrom
jumpinthefire:jumpinthefire/secondary-nics
Open

{AKS} Add support for provisioning secondary network interfaces in node pool#9886
jumpinthefire wants to merge 7 commits into
Azure:mainfrom
jumpinthefire:jumpinthefire/secondary-nics

Conversation

@jumpinthefire
Copy link
Copy Markdown

The 2026-03-02 preview version of the AKS API now allows provisioning secondary network interfaces within a node pool. This PR adds the --secondary-network-interfaces argument to az aks nodepool add to supply a JSON array (either inline or via file) to provision secondary NICs.


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

Related command

az aks nodepool add -g $RG --cluster-name $CLUSTER -n $NP --secondary-network-interfaces (...)

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 wheel==0.30.0 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 review requested due to automatic review settings May 19, 2026 16:14
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 19, 2026

❌Azure CLI Extensions Breaking Change Test
❌aks-preview
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks nodepool add cmd aks nodepool add update parameter spot_max_price: updated property default from nan to nan please change property default from nan to nan for parameter spot_max_price of cmd aks nodepool add
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter secondary_network_interfaces

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @jumpinthefire,
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 setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 19, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@jumpinthefire jumpinthefire changed the title Jumpinthefire/secondary nics {AKS} Add support for provisioning secondary network interfaces in node pool May 19, 2026
Copy link
Copy Markdown
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 support for configuring AKS node pool secondary network interfaces through the aks-preview extension, aligning az aks nodepool add with the 2026-03-02-preview AKS API capability.

Changes:

  • Adds --secondary-network-interfaces / --secondary-nics argument plumbing.
  • Parses inline JSON or @file input into AgentPoolNetworkInterface models.
  • Adds unit and live scenario coverage for inline secondary NIC configuration.

Reviewed changes

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

Show a summary per file
File Description
src/aks-preview/azext_aks_preview/custom.py Adds the new command parameter to aks_agentpool_add.
src/aks-preview/azext_aks_preview/_params.py Registers the new CLI argument and alias.
src/aks-preview/azext_aks_preview/_help.py Documents the new node pool add option.
src/aks-preview/azext_aks_preview/agentpool_decorator.py Parses secondary NIC input and attaches it to the agent pool network profile.
src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py Adds unit coverage for default, inline JSON, and non-array input.
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py Adds a live scenario for creating a node pool with secondary NICs.

Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py Outdated
Comment thread src/aks-preview/azext_aks_preview/_params.py
Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

@github-actions
Copy link
Copy Markdown
Contributor

Hi @jumpinthefire

Release Suggestions

Module: aks-preview

  • Please log updates into to src/aks-preview/HISTORY.rst
  • Update VERSION to 21.0.0b2 in src/aks-preview/setup.py

Notes

@AKSCustomResourceGroupPreparer(
random_name_length=17, name_prefix="clitest", location="eastus"
)
def test_aks_nodepool_add_with_secondary_network_interfaces(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please queue a live test run to demonstrate that it can pass?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I ran a live test locally and it passed (after some adjustments):

⏺ Bash(AZURE_TEST_RUN_LIVE=True python -m pytest azext_aks_preview/tests/latest/test_aks_commands.py -k "test_aks_nodepool_add_with_secondary_network_interfaces" -x 2>…)
  ⎿  ========== 1 passed, 365 deselected, 12 warnings in 426.83s (0:07:06) ==========

I also added the @live_only decorator but let me know if you'd rather have a recording available.

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@jumpinthefire
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 9886 in repo Azure/azure-cli-extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants