Share via


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
agentPoolName
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.

kubernetesClusterName
path True

string

pattern: ^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$

The name of the Kubernetes cluster.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
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

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.

properties.vmSkuName True

string

The name of the VM SKU that determines the size of resources allocated for node VMs.

extendedLocation

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.
The extended location of the cluster associated with the resource.

properties.administratorConfiguration

AdministratorConfiguration

AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters.
The administrator credentials to be used for the nodes in this agent pool.

properties.agentOptions

AgentOptions

AgentOptions are configurations that will be applied to each agent in an agent pool.
The configurations that will be applied to each agent in this agent pool.

properties.attachedNetworkConfiguration

AttachedNetworkConfiguration

AttachedNetworkConfiguration represents the set of workload networks to attach to a resource.
The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster.

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

KubernetesLabel[]

The labels applied to the nodes in this agent pool.

properties.taints

KubernetesLabel[]

The taints applied to the nodes in this agent pool.

properties.upgradeSettings

AgentPoolUpgradeSettings

AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
The configuration of the agent pool.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

AgentPool

The resource has been successfully created or updated.

201 Created

AgentPool

The resource has been accepted for creation or update.

Headers

Azure-AsyncOperation: string

Other Status Codes

ErrorResponse

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
AdministratorConfiguration

AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters.

AgentOptions

AgentOptions are configurations that will be applied to each agent in an agent pool.

AgentPool

AgentPool represents the agent pool of Kubernetes cluster.

AgentPoolDetailedStatus

The current status of the agent pool.

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.

AgentPoolProvisioningState

The provisioning state of the agent pool.

AgentPoolUpgradeSettings

AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.

AttachedNetworkConfiguration

AttachedNetworkConfiguration represents the set of workload networks to attach to a resource.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.

HugepagesSize

The size of the hugepages to allocate.

KubernetesLabel

KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod.

KubernetesPluginType

The indicator of how this network will be utilized by the Kubernetes cluster.

L2NetworkAttachmentConfiguration

L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network.

L3NetworkAttachmentConfiguration

L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network.

L3NetworkConfigurationIpamEnabled

The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached.

SshPublicKey

SshPublicKey represents the public key used to authenticate with a resource through SSH.

systemData

Metadata pertaining to creation and last modification of the resource.

TrunkedNetworkAttachmentConfiguration

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

SshPublicKey[]

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

HugepagesSize

2M

The size of the hugepages to allocate.

AgentPool

AgentPool represents the agent pool of Kubernetes cluster.

Name Type Description
extendedLocation

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.
The extended location of the cluster associated with the resource.

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

AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters.
The administrator credentials to be used for the nodes in this agent pool.

properties.agentOptions

AgentOptions

AgentOptions are configurations that will be applied to each agent in an agent pool.
The configurations that will be applied to each agent in this agent pool.

properties.attachedNetworkConfiguration

AttachedNetworkConfiguration

AttachedNetworkConfiguration represents the set of workload networks to attach to a resource.
The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster.

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

AgentPoolDetailedStatus

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

KubernetesLabel[]

The labels applied to the nodes in this agent pool.

properties.mode

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.

properties.provisioningState

AgentPoolProvisioningState

The provisioning state of the agent pool.

properties.taints

KubernetesLabel[]

The taints applied to the nodes in this agent pool.

properties.upgradeSettings

AgentPoolUpgradeSettings

AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
The configuration of the agent pool.

properties.vmSkuName

string

The name of the VM SKU that determines the size of resources allocated for node VMs.

systemData

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: 60
maximum: 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

L2NetworkAttachmentConfiguration[]

The list of Layer 2 Networks and related configuration for attachment.

l3Networks

L3NetworkAttachmentConfiguration[]

The list of Layer 3 Networks and related configuration for attachment.

trunkedNetworks

TrunkedNetworkAttachmentConfiguration[]

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

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

KubernetesPluginType

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

L3NetworkConfigurationIpamEnabled

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

KubernetesPluginType

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

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

createdByType

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

KubernetesPluginType

SRIOV

The indicator of how this network will be utilized by the Kubernetes cluster.