Learn R Programming

AzureContainers (version 1.0.2)

create_aks: Create Azure Kubernetes Service (AKS)

Description

Method for the AzureRMR::az_resource_group class.

Value

An object of class az_kubernetes_service representing the service.

Usage

create_aks(name, location = self$location,
           dns_prefix = name, kubernetes_version = NULL,
           enable_rbac = FALSE, agent_pools = list(),
           login_user = "", login_passkey = "",
           cluster_service_principal = NULL,
           properties = list(), ..., wait = TRUE)

Arguments

  • name: The name of the Kubernetes service.

  • location: The location/region in which to create the service. Defaults to this resource group's location.

  • dns_prefix: The domain name prefix to use for the cluster endpoint. The actual domain name will start with this argument, followed by a string of pseudorandom characters.

  • kubernetes_version: The Kubernetes version to use. If not specified, uses the most recent version of Kubernetes available.

  • enable_rbac: Whether to enable role-based access controls.

  • agent_pools: A list of pool specifications. See 'Details'.

  • login_user,login_passkey: Optionally, a login username and public key (on Linux). Specify these if you want to be able to ssh into the cluster nodes.

  • cluster_service_principal: The service principal (client) that AKS will use to manage the cluster resources. This should be a list, with the first component being the client ID and the second the client secret. If not supplied, a new service principal will be created (requires an interactive session).

  • properties: A named list of further Kubernetes-specific properties to pass to the initialization function.

  • wait: Whether to wait until the AKS resource provisioning is complete. Note that provisioning a Kubernetes cluster can take several minutes.

  • ...: Other named arguments to pass to the initialization function.

Details

An AKS resource is a Kubernetes cluster hosted in Azure. See the documentation for the resource for more information. To work with the cluster (deploy images, define and start services, etc) see the documentation for the cluster endpoint.

To specify the agent pools for the cluster, it is easiest to use the aks_pools function. This takes as arguments the name(s) of the pools, the number of nodes, the VM size(s) to use, and the operating system (Windows or Linux) to run on the VMs.

See Also

get_aks, delete_aks, list_aks, aks_pools

az_kubernetes_service

kubernetes_cluster for the cluster endpoint

AKS documentation and API reference

Kubernetes reference

Examples

Run this code
# NOT RUN {
rg <- AzureRMR::az_rm$
    new(tenant="myaadtenant.onmicrosoft.com", app="app_id", password="password")$
    get_subscription("subscription_id")$
    get_resource_group("rgname")

rg$create_aks("mycluster", agent_pools=aks_pools("pool1", 5))

# GPU-enabled cluster
rg$create_aks("mygpucluster", agent_pools=aks_pools("pool1", 5, size="Standard_NC6s_v3"))

# }

Run the code above in your browser using DataLab