Agent Pools - Create Or Update
Create or update the Kubernetes cluster agent pool.
Create a new Kubernetes cluster agent pool or update the properties of the existing one.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}?api-version=2024-07-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
agent
|
path | True |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$ |
The name of the Kubernetes cluster agent pool. |
kubernetes
|
path | True |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$ |
The name of the Kubernetes cluster. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
The geo-location where the resource lives |
properties.count | True |
integer (int64) |
The number of virtual machines that use this configuration. |
properties.mode | True |
The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. |
|
properties.vmSkuName | True |
string |
The name of the VM SKU that determines the size of resources allocated for node VMs. |
extendedLocation |
ExtendedLocation represents the Azure custom location where the resource will be created. |
||
properties.administratorConfiguration |
AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters. |
||
properties.agentOptions |
AgentOptions are configurations that will be applied to each agent in an agent pool. |
||
properties.attachedNetworkConfiguration |
AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. |
||
properties.availabilityZones |
string[] |
The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not specified, all availability zones will be used. |
|
properties.labels |
The labels applied to the nodes in this agent pool. |
||
properties.taints |
The taints applied to the nodes in this agent pool. |
||
properties.upgradeSettings |
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The resource has been successfully created or updated. |
|
201 Created |
The resource has been accepted for creation or update. Headers Azure-AsyncOperation: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create or update Kubernetes cluster agent pool
Sample request
PUT https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName?api-version=2024-07-01
{
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"administratorConfiguration": {
"adminUsername": "azure",
"sshPublicKeys": [
{
"keyData": "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"
}
]
},
"agentOptions": {
"hugepagesCount": 96,
"hugepagesSize": "1G"
},
"attachedNetworkConfiguration": {
"l2Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
"pluginType": "DPDK"
}
],
"l3Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName",
"pluginType": "SRIOV",
"ipamEnabled": "False"
}
],
"trunkedNetworks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName",
"pluginType": "MACVLAN"
}
]
},
"availabilityZones": [
"1",
"2",
"3"
],
"count": 3,
"labels": [
{
"key": "kubernetes.label",
"value": "true"
}
],
"mode": "System",
"taints": [
{
"key": "kubernetes.taint",
"value": "true:NoSchedule"
}
],
"upgradeSettings": {
"maxSurge": "1"
},
"vmSkuName": "NC_P46_224_v1"
}
}
Sample response
{
"id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName",
"name": "default",
"systemData": {
"createdAt": "2021-01-22T13:27:03.008Z",
"createdBy": "identityA",
"createdByType": "Application",
"lastModifiedAt": "2021-01-22T13:29:03.001Z",
"lastModifiedBy": "identityB",
"lastModifiedByType": "User"
},
"type": "Microsoft.NetworkCloud/kubernetesClusters/agentPools",
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"administratorConfiguration": {
"adminUsername": "azure",
"sshPublicKeys": [
{
"keyData": "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"
}
]
},
"agentOptions": {
"hugepagesCount": 96,
"hugepagesSize": "1G"
},
"attachedNetworkConfiguration": {
"l2Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
"pluginType": "DPDK"
}
],
"l3Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName",
"pluginType": "SRIOV",
"ipamEnabled": "False"
}
],
"trunkedNetworks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName",
"pluginType": "MACVLAN"
}
]
},
"availabilityZones": [
"1",
"2",
"3"
],
"count": 3,
"labels": [
{
"key": "kubernetes.label",
"value": "true"
}
],
"mode": "System",
"taints": [
{
"key": "kubernetes.taint",
"value": "true:NoSchedule"
}
],
"upgradeSettings": {
"maxSurge": "1"
},
"vmSkuName": "NC_P46_224_v1",
"provisioningState": "Succeeded",
"kubernetesVersion": "1.XX.Y",
"detailedStatus": "Available",
"detailedStatusMessage": "Agent pool is available"
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/locations/location/operationStatuses/operationId?api-version=2024-07-01
{
"id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName",
"name": "default",
"systemData": {
"createdAt": "2021-01-22T13:27:03.008Z",
"createdBy": "identityA",
"createdByType": "Application",
"lastModifiedAt": "2021-01-22T13:29:03.001Z",
"lastModifiedBy": "identityB",
"lastModifiedByType": "User"
},
"type": "Microsoft.NetworkCloud/kubernetesClusters/agentPools",
"location": "location",
"tags": {
"key1": "myvalue1",
"key2": "myvalue2"
},
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"
},
"properties": {
"administratorConfiguration": {
"adminUsername": "azure",
"sshPublicKeys": [
{
"keyData": "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"
}
]
},
"agentOptions": {
"hugepagesCount": 96,
"hugepagesSize": "1G"
},
"attachedNetworkConfiguration": {
"l2Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
"pluginType": "DPDK"
}
],
"l3Networks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName",
"pluginType": "SRIOV",
"ipamEnabled": "False"
}
],
"trunkedNetworks": [
{
"networkId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName",
"pluginType": "MACVLAN"
}
]
},
"availabilityZones": [
"1",
"2",
"3"
],
"count": 3,
"labels": [
{
"key": "kubernetes.label",
"value": "true"
}
],
"mode": "System",
"taints": [
{
"key": "kubernetes.taint",
"value": "true:NoSchedule"
}
],
"upgradeSettings": {
"maxSurge": "1"
},
"vmSkuName": "NC_P46_224_v1",
"provisioningState": "Accepted",
"kubernetesVersion": "1.XX.Y",
"detailedStatus": "Available",
"detailedStatusMessage": "Agent pool is available"
}
}
Definitions
Name | Description |
---|---|
Administrator |
AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters. |
Agent |
AgentOptions are configurations that will be applied to each agent in an agent pool. |
Agent |
AgentPool represents the agent pool of Kubernetes cluster. |
Agent |
The current status of the agent pool. |
Agent |
The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. |
Agent |
The provisioning state of the agent pool. |
Agent |
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. |
Attached |
AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. |
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Extended |
ExtendedLocation represents the Azure custom location where the resource will be created. |
Hugepages |
The size of the hugepages to allocate. |
Kubernetes |
KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod. |
Kubernetes |
The indicator of how this network will be utilized by the Kubernetes cluster. |
L2Network |
L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network. |
L3Network |
L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network. |
L3Network |
The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. |
Ssh |
SshPublicKey represents the public key used to authenticate with a resource through SSH. |
system |
Metadata pertaining to creation and last modification of the resource. |
Trunked |
TrunkedNetworkAttachmentConfiguration represents the configuration of the attachment of a trunked network. |
AdministratorConfiguration
AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters.
Name | Type | Description |
---|---|---|
adminUsername |
string |
The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes. If not supplied, a user name will be chosen by the service. |
sshPublicKeys |
The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster. In some cases, specification of public keys may be required to produce a working environment. |
AgentOptions
AgentOptions are configurations that will be applied to each agent in an agent pool.
Name | Type | Default value | Description |
---|---|---|---|
hugepagesCount |
integer (int64) |
The number of hugepages to allocate. |
|
hugepagesSize | 2M |
The size of the hugepages to allocate. |
AgentPool
AgentPool represents the agent pool of Kubernetes cluster.
Name | Type | Description |
---|---|---|
extendedLocation |
ExtendedLocation represents the Azure custom location where the resource will be created. |
|
id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.administratorConfiguration |
AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters. |
|
properties.agentOptions |
AgentOptions are configurations that will be applied to each agent in an agent pool. |
|
properties.attachedNetworkConfiguration |
AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. |
|
properties.availabilityZones |
string[] |
The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not specified, all availability zones will be used. |
properties.count |
integer (int64) |
The number of virtual machines that use this configuration. |
properties.detailedStatus |
The current status of the agent pool. |
|
properties.detailedStatusMessage |
string |
The descriptive message about the current detailed status. |
properties.kubernetesVersion |
string |
The Kubernetes version running in this agent pool. |
properties.labels |
The labels applied to the nodes in this agent pool. |
|
properties.mode |
The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. |
|
properties.provisioningState |
The provisioning state of the agent pool. |
|
properties.taints |
The taints applied to the nodes in this agent pool. |
|
properties.upgradeSettings |
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. |
|
properties.vmSkuName |
string |
The name of the VM SKU that determines the size of resources allocated for node VMs. |
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
AgentPoolDetailedStatus
The current status of the agent pool.
Value | Description |
---|---|
Available | |
Error | |
Provisioning |
AgentPoolMode
The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.
Value | Description |
---|---|
System | |
User | |
NotApplicable |
AgentPoolProvisioningState
The provisioning state of the agent pool.
Value | Description |
---|---|
Accepted | |
Canceled | |
Deleting | |
Failed | |
InProgress | |
Succeeded | |
Updating |
AgentPoolUpgradeSettings
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
Name | Type | Description |
---|---|---|
drainTimeout |
integer (int64) minimum: 60maximum: 86400 |
The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent pool. If not specified during creation, a value of 1800 seconds is used. |
maxSurge |
string |
The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 1 is used. One of MaxSurge and MaxUnavailable must be greater than 0. |
maxUnavailable |
string |
The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0. |
AttachedNetworkConfiguration
AttachedNetworkConfiguration represents the set of workload networks to attach to a resource.
Name | Type | Description |
---|---|---|
l2Networks |
The list of Layer 2 Networks and related configuration for attachment. |
|
l3Networks |
The list of Layer 3 Networks and related configuration for attachment. |
|
trunkedNetworks |
The list of Trunked Networks and related configuration for attachment. |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ExtendedLocation
ExtendedLocation represents the Azure custom location where the resource will be created.
Name | Type | Description |
---|---|---|
name |
string |
The resource ID of the extended location on which the resource will be created. |
type |
string |
The extended location type, for example, CustomLocation. |
HugepagesSize
The size of the hugepages to allocate.
Value | Description |
---|---|
2M | |
1G |
KubernetesLabel
KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod.
Name | Type | Description |
---|---|---|
key |
string |
The name of the label or taint. |
value |
string |
The value of the label or taint. |
KubernetesPluginType
The indicator of how this network will be utilized by the Kubernetes cluster.
Value | Description |
---|---|
DPDK | |
SRIOV | |
OSDevice | |
MACVLAN | |
IPVLAN |
L2NetworkAttachmentConfiguration
L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network.
Name | Type | Default value | Description |
---|---|---|---|
networkId |
string (arm-id) |
The resource ID of the network that is being configured for attachment. |
|
pluginType | SRIOV |
The indicator of how this network will be utilized by the Kubernetes cluster. |
L3NetworkAttachmentConfiguration
L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network.
Name | Type | Default value | Description |
---|---|---|---|
ipamEnabled | False |
The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. |
|
networkId |
string (arm-id) |
The resource ID of the network that is being configured for attachment. |
|
pluginType | SRIOV |
The indicator of how this network will be utilized by the Kubernetes cluster. |
L3NetworkConfigurationIpamEnabled
The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached.
Value | Description |
---|---|
True | |
False |
SshPublicKey
SshPublicKey represents the public key used to authenticate with a resource through SSH.
Name | Type | Description |
---|---|---|
keyData |
string minLength: 1 |
The SSH public key data. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
TrunkedNetworkAttachmentConfiguration
TrunkedNetworkAttachmentConfiguration represents the configuration of the attachment of a trunked network.
Name | Type | Default value | Description |
---|---|---|---|
networkId |
string (arm-id) |
The resource ID of the network that is being configured for attachment. |
|
pluginType | SRIOV |
The indicator of how this network will be utilized by the Kubernetes cluster. |