@@ -10,7 +10,7 @@ ms.topic: conceptual
10
10
ms.reviewer : larryfr
11
11
ms.author : aashishb
12
12
author : aashishb
13
- ms.date : 03/13 /2020
13
+ ms.date : 04/17 /2020
14
14
---
15
15
16
16
# Secure Azure ML experimentation and inference jobs within an Azure Virtual Network
@@ -430,14 +430,16 @@ try:
430
430
except :
431
431
print (" Creating new aks cluster" )
432
432
433
+ # Subnet to use for AKS
434
+ subnet_name = " default"
433
435
# Create AKS configuration
434
436
prov_config = AksCompute.provisioning_configuration(location = " eastus2" )
435
437
# Set info for existing virtual network to create the cluster in
436
438
prov_config.vnet_resourcegroup_name = " myvnetresourcegroup"
437
439
prov_config.vnet_name = " myvnetname"
438
440
prov_config.service_cidr = " 10.0.0.0/16"
439
441
prov_config.dns_service_ip = " 10.0.0.10"
440
- prov_config.subnet_name = " default "
442
+ prov_config.subnet_name = subnet_name
441
443
prov_config.docker_bridge_cidr = " 172.17.0.1/16"
442
444
443
445
# Create compute target
@@ -446,7 +448,7 @@ except:
446
448
aks_target.wait_for_completion(show_output = True )
447
449
448
450
# Update AKS configuration to use an internal load balancer
449
- update_config = AksUpdateConfiguration(None , " InternalLoadBalancer" , " default " )
451
+ update_config = AksUpdateConfiguration(None , " InternalLoadBalancer" , subnet_name )
450
452
aks_target.update(update_config)
451
453
# Wait for the operation to complete
452
454
aks_target.wait_for_completion(show_output = True )
0 commit comments