[AKS] Support configuring SSH for AKS nodepools - #34161
Open
Tongyao Si (norshtein) wants to merge 1 commit into
Open
Tongyao Si (norshtein) wants to merge 1 commit into
Tongyao Si (norshtein) wants to merge 1 commit into
Conversation
Tongyao Si (norshtein)
requested review from
a team and
FumingZhang
as code owners
October 2, 2026 08:20
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
elvazhu521,
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
October 2, 2026 08:20
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
CI reports missing parameter help and scenario coverage, and the changes include minor style violations.
Review effort: Balanced
Findings: 6
Open (6)
Add help text for aks create --ssh-access · New Add help text for nodepool add --ssh-access · New Document delayed effect for nodepool update --ssh-access · New Split line exceeding 120-character limit · New Remove trailing whitespace from blank line · New Remove unused CONST_SSH_ACCESS_ENTRAID import · New
What changed in this PR
Adds configurable SSH access modes for AKS cluster and node-pool creation/update.
Changes:
- Adds
--ssh-accessmodes and update confirmation. - Applies SSH settings to agent-pool security profiles.
- Adds decorator tests and history entries.
| File | Description |
|---|---|
HISTORY.rst |
Documents the new options. |
test_managed_cluster_decorator.py |
Tests cluster creation behavior. |
test_agentpool_decorator.py |
Tests node-pool creation and updates. |
managed_cluster_decorator.py |
Applies SSH access during cluster creation. |
custom.py |
Exposes handler parameters. |
agentpool_decorator.py |
Implements node-pool SSH configuration. |
_params.py |
Registers arguments and accepted values. |
_consts.py |
Defines SSH access constants. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| c.argument('enable_vtpm', action="store_true") | ||
| c.argument('enable_secure_boot', action="store_true") | ||
| # in creation scenario, use "localuser" as default | ||
| c.argument('ssh_access', arg_type=get_enum_type(ssh_accesses), default=CONST_SSH_ACCESS_LOCALUSER, is_preview=True) |
| c.argument('enable_vtpm', action='store_true') | ||
| c.argument('enable_secure_boot', action='store_true') | ||
| # in creation scenario, use "localuser" as default | ||
| c.argument('ssh_access', arg_type=get_enum_type(ssh_accesses), default=CONST_SSH_ACCESS_LOCALUSER, is_preview=True) |
| c.argument('enable_secure_boot', action='store_true') | ||
| c.argument('disable_secure_boot', action='store_true') | ||
| # in update scenario, use empty str as default | ||
| c.argument('ssh_access', arg_type=get_enum_type(ssh_accesses), is_preview=True) |
| if ssh_access is not None: | ||
| for agent_pool_profile in (mc.agent_pool_profiles or []): | ||
| if agent_pool_profile.security_profile is None: | ||
| agent_pool_profile.security_profile = self.models.AgentPoolSecurityProfile() # pylint: disable=no-member |
|
|
||
| def test_set_up_ssh_access(self): | ||
| self.common_set_up_ssh_access() | ||
|
|
| CONST_AVAILABILITY_SET, | ||
| CONST_SSH_ACCESS_LOCALUSER, | ||
| CONST_SSH_ACCESS_DISABLED, | ||
| CONST_SSH_ACCESS_ENTRAID, |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related command
az akssupport configuring SSH setting for node pools.Description
This PR add support for configuring SSH access for AKS node pool.
Testing Guide
History Notes
[AKS]
az aks nodepool create/update: Add--ssh-accesswithlocaluser,disabledandentraidoptions to configure SSH access for the node pool.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.