Provision an Azure Kubernetes Service instance (AksCompute) as a compute target for web service deployment. AksCompute is recommended for high-scale production deployments and provides fast response time and autoscaling of the deployed service. Cluster autoscaling isn't supported through the Azure ML R SDK. To change the nodes in the AksCompute cluster, use the UI for the cluster in the Azure portal. Once created, the cluster can be reused for multiple deployments.
create_aks_compute( workspace, cluster_name, agent_count = NULL, vm_size = NULL, ssl_cname = NULL, ssl_cert_pem_file = NULL, ssl_key_pem_file = NULL, location = NULL, vnet_resourcegroup_name = NULL, vnet_name = NULL, subnet_name = NULL, service_cidr = NULL, dns_service_ip = NULL, docker_bridge_cidr = NULL, cluster_purpose = c("FastProd", "DevTest") )
A string of the name of the cluster.
An integer of the number of agents (VMs) to host
containers. Defaults to
A string of the size of agent VMs. More details can be found
Note that not all sizes are available in all regions, as detailed in the
aformentioned link. Defaults to
A string of a CName to use if enabling SSL validation on the cluster. Must provide all three - CName, cert file, and key file - to enable SSL validation.
A string of a file path to a file containing cert information for SSL validation. Must provide all three - CName, cert file, and key file - to enable SSL validation.
A string of a file path to a file containing key information for SSL validation. Must provide all three - CName, cert file, and key file - to enable SSL validation.
A string of the location to provision the cluster in. If not specified, defaults to the workspace location. Available regions for this compute can be found here: "https://azure.microsoft.com/global-infrastructure/services/?regions=all&products=kubernetes-service".
A string of the name of the resource group where the virtual network is located.
A string of the name of the virtual network.
A string of the name of the subnet inside the vnet.
A string of a CIDR notation IP range from which to assign service cluster IPs.
A string of the container's DNS server IP address.
A string of a CIDR notation IP for Docker bridge.
A string describing targeted usage of the cluster. This is used to provision Azure Machine Learning components to ensure the desired level of fault-tolerance and QoS. 'FastProd' will provision components to handle higher levels of traffic with production quality fault-tolerance. This will default the AKS cluster to have 3 nodes. 'DevTest' will provision components at a minimal level for testing. This will default the AKS cluster to have 1 node. 'FastProd'is the default value.
For more information on using an AksCompute resource within a virtual network, see Secure Azure ML experimentation and inference jobs within an Azure Virtual Network.
# Create an AksCompute cluster using the default configuration (you can also # provide parameters to customize this) ws <- load_workspace_from_config() compute_target <- create_aks_compute(ws, cluster_name = 'mycluster') wait_for_provisioning_completion(compute_target)