agent_pool {AzureContainers}R Documentation

Utility function for specifying Kubernetes agent pools


Utility function for specifying Kubernetes agent pools


agent_pool(name, count, size = "Standard_DS2_v2", os = "Linux",
  disksize = 0, use_scaleset = TRUE, low_priority = FALSE,
  autoscale_nodes = FALSE, ...)



The name(s) of the pool(s).


The number of nodes per pool.


The VM type (size) to use for the pool. To see a list of available VM sizes, use the list_vm_sizes method for the resource group or subscription classes.


The operating system to use for the pool. Can be "Linux" or "Windows".


The OS disk size in gigabytes for each node in the pool. A value of 0 means to use the default disk size for the VM type.


Whether to use a VM scaleset instead of individual VMs for this pool. A scaleset offers greater flexibility than individual VMs, and is the recommended method of creating an agent pool.


If this pool uses a scaleset, whether it should be made up of spot (low-priority) VMs. A spot VM pool is cheaper, but is subject to being evicted to make room for other, higher-priority workloads. Ignored if use_scaleset=FALSE.


The cluster autoscaling parameters for the pool. To enable autoscaling, set this to a vector of 2 numbers giving the minimum and maximum size of the agent pool. Ignored if use_scaleset=FALSE.


Other named arguments, to be used as parameters for the agent pool.


agent_pool is a convenience function to simplify the task of specifying the agent pool for a Kubernetes cluster.


An object of class agent_pool, suitable for passing to the create_aks constructor method.

See Also

create_aks, list_vm_sizes

Agent pool parameters on Microsoft Docs


# pool of 5 Linux GPU-enabled VMs
agent_pool("pool1", 5, size="Standard_NC6s_v3")

# pool of 3 Windows Server VMs, 500GB disk size each
agent_pool("pool1", 3, os="Windows", disksize=500)

# enable cluster autoscaling, with a minimum of 1 and maximum of 10 nodes
agent_pool("pool1", 5, autoscale_nodes=c(1, 10))

# use individual VMs rather than scaleset
agent_pool("vmpool1", 3, use_scaleset=FALSE)

[Package AzureContainers version 1.3.2 Index]