agent_pool {AzureContainers} | R Documentation |
Utility function for specifying Kubernetes agent pools
Description
Utility function for specifying Kubernetes agent pools
Usage
agent_pool(name, count, size = "Standard_DS2_v2", os = "Linux",
disksize = 0, use_scaleset = TRUE, low_priority = FALSE,
autoscale_nodes = FALSE, ...)
Arguments
name |
The name(s) of the pool(s). |
count |
The number of nodes per pool. |
size |
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. |
os |
The operating system to use for the pool. Can be "Linux" or "Windows". |
disksize |
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. |
use_scaleset |
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. |
low_priority |
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 |
autoscale_nodes |
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 |
... |
Other named arguments, to be used as parameters for the agent pool. |
Details
agent_pool
is a convenience function to simplify the task of specifying the agent pool for a Kubernetes cluster.
Value
An object of class agent_pool
, suitable for passing to the create_aks
constructor method.
See Also
Agent pool parameters on Microsoft Docs
Examples
# 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)