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 ae8a912e64d..71347c91a81 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. @@ -546,6 +549,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 de1de8e23ab..e49ae6047e1 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.") @@ -296,6 +305,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 829f116efdc..dd4d2f72e08 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acs/custom.py @@ -2035,6 +2035,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, @@ -2098,6 +2099,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') @@ -2428,6 +2432,10 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint: cluster_identity_object_id, assign_kubelet_identity) + auto_upgrade_profile = None + if auto_upgrade_channel is not None: + auto_upgrade_profile = ManagedClusterAutoUpgradeProfile(upgrade_channel=auto_upgrade_channel) + mc = ManagedCluster( location=location, tags=tags, @@ -2445,7 +2453,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 ) use_custom_private_dns_zone = False @@ -2753,6 +2762,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, @@ -2765,6 +2775,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') @@ -2794,6 +2807,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): @@ -2806,6 +2820,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 ' @@ -2967,6 +2982,12 @@ def aks_update(cmd, client, resource_group_name, name, if disable_ahub: instance.windows_profile.license_type = 'None' + if instance.auto_upgrade_profile is None: + instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile() + + if auto_upgrade_channel is not None: + instance.auto_upgrade_profile.upgrade_channel = auto_upgrade_channel + if windows_admin_password: instance.windows_profile.admin_password = windows_admin_password 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..6ca31e01b49 --- /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,1092 @@ +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.0 (DOCKER) azsdk-python-azure-mgmt-resource/18.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-16T07:25:15Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Aug 2021 19:08:19 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: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitesthvgxefxgf-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 AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT"}]}}, + "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"}}, + "location": "westus2"}' + 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.0.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-05-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-clitesthvgxefxgf-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.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.25\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT\"\ + \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/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2682' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:08:22 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:08:52 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:09:22 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:09:53 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:10:23 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:10:53 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:11:23 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:11:53 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/3226c745-1e77-4bfa-ad0f-51aad83f93c5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"45c72632-771e-fa4b-ad0f-51aad83f93c5\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-08-17T19:08:23.2Z\",\n \"endTime\"\ + : \"2021-08-17T19:12:00.0138999Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '164' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:12:24 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-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-clitesthvgxefxgf-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.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.25\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT\"\ + \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/5404bfc5-8ced-44be-9c39-1f8b7c5dd8e9\"\ + \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: + - Tue, 17 Aug 2021 19:12:24 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-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-clitesthvgxefxgf-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.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.25\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT\"\ + \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/5404bfc5-8ced-44be-9c39-1f8b7c5dd8e9\"\ + \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: + - Tue, 17 Aug 2021 19:12:24 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: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.7", "dnsPrefix": "cliakstest-clitesthvgxefxgf-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 AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT"}]}}, + "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/5404bfc5-8ced-44be-9c39-1f8b7c5dd8e9"}]}}, + "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"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.0.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-05-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-clitesthvgxefxgf-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.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.25\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT\"\ + \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/5404bfc5-8ced-44be-9c39-1f8b7c5dd8e9\"\ + \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/f6261f05-9be1-4c82-83a8-fb500a14cd3a?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3344' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:12:26 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/f6261f05-9be1-4c82-83a8-fb500a14cd3a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"051f26f6-e19b-824c-83a8-fb500a14cd3a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:12:27.4266666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:12:57 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/f6261f05-9be1-4c82-83a8-fb500a14cd3a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"051f26f6-e19b-824c-83a8-fb500a14cd3a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-08-17T19:12:27.4266666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:13:27 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/locations/westus2/operations/f6261f05-9be1-4c82-83a8-fb500a14cd3a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"051f26f6-e19b-824c-83a8-fb500a14cd3a\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-08-17T19:12:27.4266666Z\",\n \"\ + endTime\": \"2021-08-17T19:13:34.0430299Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Tue, 17 Aug 2021 19:13:57 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.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/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-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-clitesthvgxefxgf-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesthvgxefxgf-8ecadf-f50f966d.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.25\",\n \"\ + enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\"\ + : \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7BrN7Z7fvja6OUPwYKSlh8XUH5GKbFAv+01WJwQIHF+6XLJ8Q2SDdmKq2ABvU//T8Vl+83IfCbrSzPzmryQrDUsYP+SeyiTsrkAla9hQaawtdoD5bcp7xjQdbu2AuuJGrfLJbBJ9eTaKhMCvddLZNpe+FcXapW9TS+NRh2t2/eg+vwf0g9o8ucywEaV8YWANbHKZ+cK5mTpZrN9/ZXEEhl5aRQD9xzqzWo2slfH3gRwQjA4jlgzHxUUtQoSvuA69TC2snbMk5LZ0r/XCtt4pxgfwjBCeWVl3WPCs1Df3oUKzEnRRbiMzBxjRBRrMsqu5kcetpcPDDe5kWTKBMNjKT\"\ + \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/5404bfc5-8ced-44be-9c39-1f8b7c5dd8e9\"\ + \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: + - Tue, 17 Aug 2021 19:13:58 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.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/16.0.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-05-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/61a63911-78fb-4afc-ad8f-09240ddd32f7?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 17 Aug 2021 19:13:59 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/61a63911-78fb-4afc-ad8f-09240ddd32f7?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 e5521072c84..381333ac312 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')