Skip to content

[AKS] - az aks create is missing the option to set apiServerAccessProfile.disableRunCommand=true #27561

@zioproto

Description

@zioproto

Describe the bug

To access AKS private clusters is possible to use the az aks command invoke --command <command>
https://learn.microsoft.com/en-us/azure/aks/access-private-cluster?tabs=azure-cli

This feature is enabled by default, and since the feature has been promoted from preview to GA it is not possible to disable it neither with Azure Portal or with Azure CLI.

Old Preview announcement (now GA):
https://azure.microsoft.com/en-us/updates/public-preview-of-azure-kubernetes-service-aks-runcommand-feature/

API call documentation:
https://learn.microsoft.com/en-us/rest/api/aks/managed-clusters/create-or-update?tabs=HTTP#create-managed-cluster-with-runcommand-disabled

The current workaround is to use this command after cluster creation

az resource update --id aks-resource-id --set apiServerAccessProfile.disableRunCommand=false

Related to:
Azure/AKS#2059 (comment)

Related command

az aks create

Errors

N/A

Issue script & Debug output

N/A

Expected behavior

It should be possible to create a cluster with the AKS Run Command feature disabled.

Environment Summary

azure-cli 2.53.0

core 2.53.0
telemetry 1.1.0

Extensions:
account 0.2.5
aks-preview 0.5.160
alb 0.2.0
amg 1.2.3
containerapp 0.3.28
costmanagement 0.2.1
fleet 0.2.0
front-door 1.0.17
k8s-extension 1.4.0
monitor-control-service 0.3.1
rdbms-connect 1.0.4
serial-console 0.1.6

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSaz aks/acs/openshiftAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions