diff --git a/src/azure-cli/azure/cli/command_modules/acs/_help.py b/src/azure-cli/azure/cli/command_modules/acs/_help.py index f87930c4551..27aeb86ad80 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_help.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_help.py @@ -312,6 +312,9 @@ type: string short-summary: How outbound traffic will be configured for a cluster. long-summary: Select between loadBalancer and userDefinedRouting. If not set, defaults to type loadBalancer. Requires --vnet-subnet-id to be provided with a preconfigured route table and --load-balancer-sku to be Standard. + - name: --auto-upgrade-channel + type: string + short-summary: Specify the upgrade channel for autoupgrade. - name: --enable-cluster-autoscaler type: bool short-summary: Enable cluster autoscaler, default value is false. @@ -549,6 +552,9 @@ type: int short-summary: Load balancer idle timeout in minutes. long-summary: Desired idle timeout for load balancer outbound flows, default is 30 minutes. Please specify a value in the range of [4, 100]. + - name: --auto-upgrade-channel + type: string + short-summary: Specify the upgrade channel for autoupgrade. - name: --attach-acr type: string short-summary: Grant the 'acrpull' role assignment to the ACR specified by name or resource ID. diff --git a/src/azure-cli/azure/cli/command_modules/acs/_params.py b/src/azure-cli/azure/cli/command_modules/acs/_params.py index 74d1fabd2d9..e5d44d63d0e 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_params.py @@ -64,6 +64,14 @@ "westus", ] +auto_upgrade_channels = [ + "rapid", + "stable", + "patch", + "node-image", + "none" +] + storage_profile_types = ["StorageAccount", "ManagedDisks"] nodepool_mode_type = ["System", "User"] @@ -203,6 +211,7 @@ def load_arguments(self, _): validator=validate_load_balancer_idle_timeout) c.argument('outbound_type', arg_type=get_enum_type([CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING])) + c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels)) c.argument('enable_cluster_autoscaler', action='store_true') c.argument('cluster_autoscaler_profile', nargs='+', options_list=["--cluster-autoscaler-profile", "--ca-profile"], validator=validate_cluster_autoscaler_profile, help="Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.") @@ -297,6 +306,7 @@ def load_arguments(self, _): validator=validate_load_balancer_outbound_ports) c.argument('load_balancer_idle_timeout', type=int, validator=validate_load_balancer_idle_timeout) + c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels)) c.argument('api_server_authorized_ip_ranges', type=str, validator=validate_ip_ranges) c.argument('enable_ahub', options_list=['--enable-ahub']) diff --git a/src/azure-cli/azure/cli/command_modules/acs/custom.py b/src/azure-cli/azure/cli/command_modules/acs/custom.py index f1e37952a01..f97011bc5da 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acs/custom.py @@ -2036,6 +2036,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: load_balancer_outbound_ports=None, load_balancer_idle_timeout=None, outbound_type=None, + auto_upgrade_channel=None, enable_addons=None, workspace_resource_id=None, vnet_subnet_id=None, @@ -2076,6 +2077,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: no_wait=False, yes=False, enable_azure_rbac=False): + auto_upgrade_profile = None ManagedClusterWindowsProfile = cmd.get_models('ManagedClusterWindowsProfile', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') @@ -2100,6 +2102,9 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') + ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') ManagedClusterAgentPoolProfile = cmd.get_models('ManagedClusterAgentPoolProfile', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') @@ -2430,6 +2435,9 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: cluster_identity_object_id, assign_kubelet_identity) + if auto_upgrade_channel is not None: + auto_upgrade_profile = ManagedClusterAutoUpgradeProfile(upgrade_channel=auto_upgrade_channel) + mc = ManagedCluster( location=location, tags=tags, @@ -2447,7 +2455,8 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: api_server_access_profile=api_server_access_profile, identity=identity, disk_encryption_set_id=node_osdisk_diskencryptionset_id, - identity_profile=identity_profile + identity_profile=identity_profile, + auto_upgrade_profile=auto_upgrade_profile ) if disable_public_fqdn: @@ -2771,6 +2780,7 @@ def aks_update(cmd, client, resource_group_name, name, enable_ahub=False, disable_ahub=False, windows_admin_password=None, + auto_upgrade_channel=None, enable_managed_identity=False, assign_identity=None, yes=False, @@ -2785,6 +2795,9 @@ def aks_update(cmd, client, resource_group_name, name, ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') + ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') ManagedClusterIdentity = cmd.get_models('ManagedClusterIdentity', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') @@ -2814,6 +2827,7 @@ def aks_update(cmd, client, resource_group_name, name, not update_aad_profile and not enable_ahub and not disable_ahub and + not auto_upgrade_channel and not windows_admin_password and not enable_managed_identity and not assign_identity and @@ -2828,6 +2842,7 @@ def aks_update(cmd, client, resource_group_name, name, '"--load-balancer-outbound-ip-prefixes" or' '"--load-balancer-outbound-ports" or' '"--load-balancer-idle-timeout" or' + '"--auto-upgrade-channel" or ' '"--attach-acr" or "--detach-acr" or' '"--uptime-sla" or' '"--no-uptime-sla" or ' @@ -2991,6 +3006,11 @@ def aks_update(cmd, client, resource_group_name, name, if disable_ahub: instance.windows_profile.license_type = 'None' + if auto_upgrade_channel is not None: + if instance.auto_upgrade_profile is None: + instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile() + instance.auto_upgrade_profile.upgrade_channel = auto_upgrade_channel + if enable_public_fqdn and disable_public_fqdn: raise MutuallyExclusiveArgumentError( 'Cannot specify "--enable-public-fqdn" and "--disable-public-fqdn" at the same time') diff --git a/src/azure-cli/azure/cli/command_modules/acs/tests/latest/recordings/test_aks_create_with_auto_upgrade_channel.yaml b/src/azure-cli/azure/cli/command_modules/acs/tests/latest/recordings/test_aks_create_with_auto_upgrade_channel.yaml new file mode 100644 index 00000000000..fe7a62d9ee3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/acs/tests/latest/recordings/test_aks_create_with_auto_upgrade_channel.yaml @@ -0,0 +1,896 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-20T21:48:04Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 20 Aug 2021 21:48:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitest3jlhib6bi-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", + "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3"}]}}, + "addonProfiles": {}, "enableRBAC": true, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "standard"}, "autoUpgradeProfile": {"upgradeChannel": "rapid"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1287' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.20.7\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest3jlhib6bi-8ecadf\",\n \"fqdn\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"\ + code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.20.7\",\n\ + \ \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"mode\"\ + : \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\"\ + : false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"\ + nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.07.31\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ + : \"standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ + : {\n \"count\": 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\"\ + ,\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\"\ + ,\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"\ + loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"autoUpgradeProfile\"\ + : {\n \"upgradeChannel\": \"rapid\"\n }\n },\n \"identity\": {\n \ + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2682' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:48:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b0c6921a-8e40-c54e-987b-ac041e029b9a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-20T21:48:14.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:48:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b0c6921a-8e40-c54e-987b-ac041e029b9a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-20T21:48:14.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:49:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b0c6921a-8e40-c54e-987b-ac041e029b9a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-20T21:48:14.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:49:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b0c6921a-8e40-c54e-987b-ac041e029b9a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-20T21:48:14.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:50:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1a92c6b0-408e-4ec5-987b-ac041e029b9a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b0c6921a-8e40-c54e-987b-ac041e029b9a\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-08-20T21:48:14.1366666Z\",\n \"\ + endTime\": \"2021-08-20T21:50:37.5920934Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:50:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --generate-ssh-keys --enable-managed-identity + --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.20.7\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest3jlhib6bi-8ecadf\",\n \"fqdn\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.20.7\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\"\ + : false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"\ + nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.07.31\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ + : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ + : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ + \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/99efcda2-c2e1-458e-987b-f21542d2bcde\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ + : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"autoUpgradeProfile\"\ + : {\n \"upgradeChannel\": \"rapid\"\n }\n },\n \"identity\": {\n \ + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3345' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:50:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.20.7\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest3jlhib6bi-8ecadf\",\n \"fqdn\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.20.7\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\"\ + : false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"\ + nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.07.31\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ + : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ + : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ + \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/99efcda2-c2e1-458e-987b-f21542d2bcde\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ + : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"autoUpgradeProfile\"\ + : {\n \"upgradeChannel\": \"rapid\"\n }\n },\n \"identity\": {\n \ + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3345' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:50:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "sku": {"name": "Basic", "tier": "Free"}, "identity": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.20.7", "dnsPrefix": + "cliakstest-clitest3jlhib6bi-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": + "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", "kubeletDiskType": + "OS", "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.7", "enableNodePublicIP": false, + "nodeLabels": {}, "enableEncryptionAtHost": false, "enableUltraSSD": false, + "enableFIPS": false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": + "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3"}]}}, + "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "Standard", + "loadBalancerProfile": {"managedOutboundIPs": {"count": 1}, "effectiveOutboundIPs": + [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/99efcda2-c2e1-458e-987b-f21542d2bcde"}]}}, + "autoUpgradeProfile": {"upgradeChannel": "stable"}, "identityProfile": {"kubeletidentity": + {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2178' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.20.7\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest3jlhib6bi-8ecadf\",\n \"fqdn\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"\ + code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.20.7\",\n\ + \ \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"mode\"\ + : \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\"\ + : false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"\ + nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.07.31\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ + : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ + : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ + \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/99efcda2-c2e1-458e-987b-f21542d2bcde\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ + : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"autoUpgradeProfile\"\ + : {\n \"upgradeChannel\": \"stable\"\n }\n },\n \"identity\": {\n \ + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/cab37b14-a07c-400c-b833-e49aec5206df?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3344' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:50:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/cab37b14-a07c-400c-b833-e49aec5206df?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"147bb3ca-7ca0-0c40-b833-e49aec5206df\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-20T21:50:49.1966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:51:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/cab37b14-a07c-400c-b833-e49aec5206df?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"147bb3ca-7ca0-0c40-b833-e49aec5206df\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-08-20T21:50:49.1966666Z\",\n \"\ + endTime\": \"2021-08-20T21:51:46.5352484Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:51:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --auto-upgrade-channel + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.20.7\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest3jlhib6bi-8ecadf\",\n \"fqdn\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest3jlhib6bi-8ecadf-8654e921.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.20.7\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\"\ + : false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"\ + nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.07.31\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVCmm6K3hhvySOsvURiegRRjAAe/QAy21GsrvTB+LUDnfVUBo18rSJE4BlHRXAP2i9aGQDBTgCcCy6EvDmDT3hE+pFljO1hZLYyloUsdQJ9zGWxGhGXcMXpUdnUiXaPIofoTYby03mzCNhWYw/SnsVv2DSZWOGjTDcIsMqD5+J1eBYMV0sqvcvRA5hnJJ4Kkzap+X92jshzLWLFYGsVBM93nqYZltrYlWVG4mYtvF2Smc2RhjaTy7lcXxH/rRpRyl3AH6SWS/hCN5AhDwM0HJVkwkASQ0VpyOgtFKbtESK+U6YIYhsCAOtGiDtitZuWgVPqBt5OKPTXBdtKZbzCTy3\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ + : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ + : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ + \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/99efcda2-c2e1-458e-987b-f21542d2bcde\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ + : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"autoUpgradeProfile\"\ + : {\n \"upgradeChannel\": \"stable\"\n }\n },\n \"identity\": {\n \ + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3346' + content-type: + - application/json + date: + - Fri, 20 Aug 2021 21:51:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.27.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.9 + (Linux-4.19.104-microsoft-standard-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/dacad100-53bc-42bc-a637-2ef8cb097ccc?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 20 Aug 2021 21:51:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/dacad100-53bc-42bc-a637-2ef8cb097ccc?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py b/src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py index 8d7b72703a9..4fb9134badf 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py +++ b/src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py @@ -4598,6 +4598,35 @@ def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_gr self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() + @ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_auto_upgrade_channel(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--generate-ssh-keys --enable-managed-identity ' \ + '--auto-upgrade-channel rapid' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('autoUpgradeProfile.upgradeChannel', 'rapid') + ]) + + # update upgrade channel + self.cmd('aks update --resource-group={resource_group} --name={name} --auto-upgrade-channel stable', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('autoUpgradeProfile.upgradeChannel', 'stable') + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @live_only() @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')