你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Agent Pools - Get
获取指定的托管群集代理池。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}?api-version=2024-02-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
agent
|
path | True |
string |
代理池的名称。 Regex pattern: |
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
resource
|
path | True |
string |
托管群集资源的名称。 Regex pattern: |
subscription
|
path | True |
string uuid |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
确定 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Get Agent Pool
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2024-02-01
Sample Response
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"name": "agentpool1",
"properties": {
"provisioningState": "Succeeded",
"count": 3,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"orchestratorVersion": "1.9.6",
"currentOrchestratorVersion": "1.9.6",
"nodeImageVersion": "AKSUbuntu:1604:2020.03.11",
"upgradeSettings": {
"maxSurge": "33%"
}
}
}
定义
名称 | 说明 |
---|---|
Agent |
代理池。 |
Agent |
代理池的模式。 |
Agent |
代理池的网络设置。 |
Agent |
代理池的类型。 |
Agent |
用于升级代理池的设置 |
Agent |
Windows 代理池的特定配置文件。 |
Cloud |
来自容器服务的错误响应。 |
Cloud |
来自容器服务的错误响应。 |
code |
指示群集是正在运行还是已停止 |
Creation |
从源资源创建目标资源时使用的数据。 |
GPUInstance |
GPUInstanceProfile 用于为受支持的 GPU VM SKU 指定 GPU MIG 实例配置文件。 |
IPTag |
包含与 对象关联的 IPTag。 |
Kubelet |
代理节点的 Kubelet 配置。 |
Kubelet |
确定 emptyDir 卷、容器运行时数据根和 Kubelet 临时存储的位置。 |
Linux |
Linux 代理节点的 OS 配置。 |
OSDisk |
要用于代理池中计算机的 OS 磁盘类型。 |
OSSKU |
指定代理池使用的 OS SKU。 如果 OSType 为 Linux,则默认值为 Ubuntu。 当 Kubernetes <= 1.24 时,默认值为 Windows2019;如果 OSType 为 Windows,则当 Kubernetes >= 1.25 时,默认值为 Windows2022。 |
OSType |
操作系统类型。 默认值为 Linux。 |
Port |
端口范围。 |
Power |
描述群集的电源状态 |
Protocol |
端口的网络协议。 |
Scale |
介绍如何在代理池中添加或删除 VM。 请参阅 计费状态。 |
Scale |
虚拟机规模集逐出策略。 |
Scale |
虚拟机规模集优先级。 |
Sysctl |
Linux 代理节点的 Sysctl 设置。 |
Workload |
确定节点可以运行的工作负荷类型。 |
AgentPool
代理池。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
资源 ID。 |
|
name |
string |
资源组中唯一的资源的名称。 此名称可用于访问资源。 |
|
properties.availabilityZones |
string[] |
要用于节点的可用性区域列表。 仅当 AgentPoolType 属性为“VirtualMachineScaleSets”时,才能指定此值。 |
|
properties.capacityReservationGroupID |
string |
容量预留组的完全限定资源 ID,用于从保留组虚拟机提供虚拟机。 |
|
properties.count |
integer |
) 托管 docker 容器 (VM 的代理数。 对于用户池,允许的值必须介于 0 到 1000 ((含) )范围内,系统池的) 范围为 1 到 1000 (非独占) 。 默认值为 1。 |
|
properties.creationData |
如果将使用快照创建/升级节点池,则用于指定源快照 ID 的 CreationData。 |
||
properties.currentOrchestratorVersion |
string |
代理池运行的 Kubernetes 版本。 |
|
properties.enableAutoScaling |
boolean |
是否启用自动缩放程序 |
|
properties.enableEncryptionAtHost |
boolean |
是否启用基于主机的 OS 和数据驱动器加密。 |
|
properties.enableFIPS |
boolean |
是否使用启用了 FIPS 的 OS。 |
|
properties.enableNodePublicIP |
boolean |
是否为每个节点分配自己的公共 IP。 |
|
properties.enableUltraSSD |
boolean |
是否启用 UltraSSD |
|
properties.gpuInstanceProfile |
GPUInstanceProfile 用于为受支持的 GPU VM SKU 指定 GPU MIG 实例配置文件。 |
||
properties.hostGroupID |
string |
要从中预配虚拟机的专用主机组的完全限定资源 ID,仅在创建方案中使用,在设置后不允许更改。 |
|
properties.kubeletConfig |
代理节点的 Kubelet 配置。 |
||
properties.kubeletDiskType |
确定 emptyDir 卷、容器运行时数据根和 Kubelet 临时存储的位置。 |
||
properties.linuxOSConfig |
Linux 代理节点的 OS 配置。 |
||
properties.maxCount |
integer |
自动缩放的最大节点数 |
|
properties.maxPods |
integer |
可在节点上运行的 Pod 的最大数目。 |
|
properties.minCount |
integer |
用于自动缩放的最小节点数 |
|
properties.mode |
代理池的模式。 |
||
properties.networkProfile |
代理池的网络相关设置。 |
||
properties.nodeImageVersion |
string |
节点映像的版本 |
|
properties.nodeLabels |
object |
要跨代理池中的所有节点持久保存的节点标签。 |
|
properties.nodePublicIPPrefixID |
string |
VM 节点应从中使用 IP 的公共 IP 前缀 ID。 |
|
properties.nodeTaints |
string[] |
在节点池创建和缩放期间添加到新节点的污点。 例如,key=value:NoSchedule。 |
|
properties.orchestratorVersion |
string |
用户指定的 Kubernetes 版本。 |
|
properties.osDiskSizeGB |
integer |
OS 磁盘大小(GB)用于指定主/代理池中每台计算机的磁盘大小。 如果指定 0,它将根据指定的 vmSize 应用默认 osDisk 大小。 |
|
properties.osDiskType |
要用于代理池中计算机的 OS 磁盘类型。 |
||
properties.osSKU |
指定代理池使用的 OS SKU。 如果 OSType 为 Linux,则默认值为 Ubuntu。 当 Kubernetes <= 1.24 时,默认值为 Windows2019;如果 OSType 为 Windows,则当 Kubernetes >= 1.25 时,默认值为 Windows2022。 |
||
properties.osType | Linux |
操作系统类型。 默认值为 Linux。 |
|
properties.podSubnetID |
string |
启动时 Pod 将加入的子网的 ID。 |
|
properties.powerState |
代理池是正在运行还是已停止。 |
||
properties.provisioningState |
string |
当前部署或预配状态。 |
|
properties.proximityPlacementGroupID |
string |
邻近放置组的 ID。 |
|
properties.scaleDownMode |
缩放代理池时要使用的纵向缩减模式。 |
||
properties.scaleSetEvictionPolicy | Delete |
要使用的虚拟机规模集逐出策略。 |
|
properties.scaleSetPriority | Regular |
虚拟机规模集优先级。 如果未指定,则默认值为“Regular”。 |
|
properties.spotMaxPrice |
number |
-1 |
) 愿意为现成实例支付的最高价格 (美元。 可能的值是大于零或 -1 的任何十进制值,指示默认价格是按需的。 |
properties.tags |
object |
要保留在代理池虚拟机规模集上的标记。 |
|
properties.type |
代理池的类型。 |
||
properties.upgradeSettings |
用于升级代理池的设置 |
||
properties.vmSize |
string |
代理池 VM 的大小。 |
|
properties.vnetSubnetID |
string |
代理池节点和(可选)Pod 将在启动时加入的子网的 ID。 |
|
properties.windowsProfile |
Windows 代理池的特定配置文件。 |
||
properties.workloadRuntime |
确定节点可以运行的工作负荷类型。 |
||
type |
string |
资源类型 |
AgentPoolMode
代理池的模式。
名称 | 类型 | 说明 |
---|---|---|
System |
string |
系统代理池主要用于托管关键系统 Pod,例如 CoreDNS 和 metrics-server。 系统代理池 osType 必须是 Linux。 系统代理池 VM SKU 必须至少具有 2vCPU 和 4GB 内存。 |
User |
string |
用户代理池主要用于托管应用程序 Pod。 |
AgentPoolNetworkProfile
代理池的网络设置。
名称 | 类型 | 说明 |
---|---|---|
allowedHostPorts |
允许访问的端口范围。 允许指定的范围重叠。 |
|
applicationSecurityGroups |
string[] |
创建代理池时将关联的应用程序安全组的 ID。 |
nodePublicIPTags |
IPTag[] |
实例级公共 IP 的 IPTag。 |
AgentPoolType
代理池的类型。
名称 | 类型 | 说明 |
---|---|---|
AvailabilitySet |
string |
强烈建议不要使用此功能。 |
VirtualMachineScaleSets |
string |
创建由虚拟机规模集支持的代理池。 |
AgentPoolUpgradeSettings
用于升级代理池的设置
名称 | 类型 | 说明 |
---|---|---|
drainTimeoutInMinutes |
integer |
节点的排出超时 |
maxSurge |
string |
升级期间激增的最大节点数或百分比。 |
nodeSoakDurationInMinutes |
integer |
节点的浸泡持续时间 |
AgentPoolWindowsProfile
Windows 代理池的特定配置文件。
名称 | 类型 | 说明 |
---|---|---|
disableOutboundNat |
boolean |
是否在 Windows 节点中禁用出站NAT |
CloudError
来自容器服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
有关错误的详细信息。 |
CloudErrorBody
来自容器服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,属性的名称出错。 |
code
指示群集是正在运行还是已停止
名称 | 类型 | 说明 |
---|---|---|
Running |
string |
群集正在运行。 |
Stopped |
string |
群集已停止。 |
CreationData
从源资源创建目标资源时使用的数据。
名称 | 类型 | 说明 |
---|---|---|
sourceResourceId |
string |
这是要用于创建目标对象的源对象的 ARM ID。 |
GPUInstanceProfile
GPUInstanceProfile 用于为受支持的 GPU VM SKU 指定 GPU MIG 实例配置文件。
名称 | 类型 | 说明 |
---|---|---|
MIG1g |
string |
|
MIG2g |
string |
|
MIG3g |
string |
|
MIG4g |
string |
|
MIG7g |
string |
IPTag
包含与 对象关联的 IPTag。
名称 | 类型 | 说明 |
---|---|---|
ipTagType |
string |
IP 标记类型。 示例:RoutingPreference。 |
tag |
string |
与公共 IP 关联的 IP 标记的值。 示例:Internet。 |
KubeletConfig
代理节点的 Kubelet 配置。
名称 | 类型 | 说明 |
---|---|---|
allowedUnsafeSysctls |
string[] |
允许的不安全 sysctls 或不安全 sysctl 模式列表 (以) 结尾 |
containerLogMaxFiles |
integer |
一个容器可以存在的最大容器日志文件数。 该数字必须≥ 2。 |
containerLogMaxSizeMB |
integer |
最大大小 (例如,在轮换容器日志文件之前为 10Mi) 。 |
cpuCfsQuota |
boolean |
如果为指定 CPU 限制的容器启用了 CPU CFS 配额强制实施。 |
cpuCfsQuotaPeriod |
string |
CPU CFS 配额周期值。 |
cpuManagerPolicy |
string |
要使用的 CPU 管理器策略。 |
failSwapOn |
boolean |
如果设置为 true,则如果在节点上启用了交换,则会导致 Kubelet 无法启动。 |
imageGcHighThreshold |
integer |
自此起始终运行映像垃圾回收的磁盘使用量百分比。 |
imageGcLowThreshold |
integer |
在此之前从不运行映像垃圾回收的磁盘使用量百分比。 |
podMaxPids |
integer |
每个 Pod 的最大进程数。 |
topologyManagerPolicy |
string |
要使用的拓扑管理器策略。 |
KubeletDiskType
确定 emptyDir 卷、容器运行时数据根和 Kubelet 临时存储的位置。
名称 | 类型 | 说明 |
---|---|---|
OS |
string |
Kubelet 将 OS 磁盘用于其数据。 |
Temporary |
string |
Kubelet 将临时磁盘用于其数据。 |
LinuxOSConfig
Linux 代理节点的 OS 配置。
名称 | 类型 | 说明 |
---|---|---|
swapFileSizeMB |
integer |
将在每个节点上创建的交换文件的大小(以 MB 为单位)。 |
sysctls |
Linux 代理节点的 Sysctl 设置。 |
|
transparentHugePageDefrag |
string |
内核是否应积极利用内存压缩来提供更多的巨页。 |
transparentHugePageEnabled |
string |
是否启用了透明巨页。 |
OSDiskType
要用于代理池中计算机的 OS 磁盘类型。
名称 | 类型 | 说明 |
---|---|---|
Ephemeral |
string |
临时 OS 磁盘仅存储在主机上,就像临时磁盘一样。 这样的读/写延迟较低,且节点缩放和群集升级速度较快。 |
Managed |
string |
Azure 会将虚拟机的操作系统磁盘复制到 Azure 存储,以避免在 VM 需要重新定位到另一台主机时数据丢失。 由于容器不是设计为保留本地状态,因此此行为提供有限的值,同时存在一些缺点,包括节点预配速度较慢和读/写延迟较高。 |
OSSKU
指定代理池使用的 OS SKU。 如果 OSType 为 Linux,则默认值为 Ubuntu。 当 Kubernetes <= 1.24 时,默认值为 Windows2019;如果 OSType 为 Windows,则当 Kubernetes >= 1.25 时,默认值为 Windows2022。
名称 | 类型 | 说明 |
---|---|---|
AzureLinux |
string |
使用 AzureLinux 作为节点映像的 OS。 Azure Linux 是 Microsoft 构建的容器优化 Linux 发行版,有关详细信息,请访问 https://aka.ms/azurelinux 。 |
CBLMariner |
string |
已弃用 OSSKU。 Microsoft 建议新部署改为选择“AzureLinux”。 |
Ubuntu |
string |
使用 Ubuntu 作为节点映像的 OS。 |
Windows2019 |
string |
使用 Windows2019 作为节点映像的 OS。 不支持系统节点池。 Windows2019 仅支持 Windows2019 容器;它不能运行 Windows2022 容器,反之亦然。 |
Windows2022 |
string |
使用 Windows2022 作为节点映像的 OS。 不支持系统节点池。 Windows2022 仅支持 Windows2022 容器;它无法运行 Windows2019 容器,反之亦然。 |
OSType
操作系统类型。 默认值为 Linux。
名称 | 类型 | 说明 |
---|---|---|
Linux |
string |
使用 Linux。 |
Windows |
string |
使用 Windows。 |
PortRange
端口范围。
名称 | 类型 | 说明 |
---|---|---|
portEnd |
integer |
范围中包含的最大端口。 其范围为 1 到 65535,并且应大于或等于 portStart。 |
portStart |
integer |
范围中包含的最小端口。 其范围为 1 到 65535,并且应小于或等于 portEnd。 |
protocol |
端口的网络协议。 |
PowerState
描述群集的电源状态
名称 | 类型 | 说明 |
---|---|---|
code |
指示群集是正在运行还是已停止 |
Protocol
端口的网络协议。
名称 | 类型 | 说明 |
---|---|---|
TCP |
string |
TCP 协议。 |
UDP |
string |
UDP 协议。 |
ScaleDownMode
介绍如何在代理池中添加或删除 VM。 请参阅 计费状态。
名称 | 类型 | 说明 |
---|---|---|
Deallocate |
string |
如果已解除分配的实例在纵向扩展期间存在) , (则在纵向扩展期间尝试启动已解除分配的实例,并在纵向缩减期间解除分配实例。 |
Delete |
string |
在纵向扩展期间创建新实例,在纵向扩展期间删除实例。 |
ScaleSetEvictionPolicy
虚拟机规模集逐出策略。
名称 | 类型 | 说明 |
---|---|---|
Deallocate |
string |
节点池的基础规模集中的节点在逐出时设置为“已停止-解除分配”状态。 处于 stopped-deallocated 状态的节点会根据计算配额进行计数,可能会导致群集缩放或升级问题。 |
Delete |
string |
节点池的基础规模集中的节点在逐出时会被删除。 |
ScaleSetPriority
虚拟机规模集优先级。
名称 | 类型 | 说明 |
---|---|---|
Regular |
string |
将使用常规 VM。 |
Spot |
string |
将使用现成优先级 VM。 没有针对现成节点的 SLA。 有关详细信息 ,请参阅 AKS 上的 spot 。 |
SysctlConfig
Linux 代理节点的 Sysctl 设置。
名称 | 类型 | 说明 |
---|---|---|
fsAioMaxNr |
integer |
Sysctl 设置 fs.aio-max-nr。 |
fsFileMax |
integer |
Sysctl setting fs.file-max. |
fsInotifyMaxUserWatches |
integer |
Sysctl 设置 fs.inotify.max_user_watches。 |
fsNrOpen |
integer |
Sysctl 设置fs.nr_open。 |
kernelThreadsMax |
integer |
Sysctl setting kernel.threads-max. |
netCoreNetdevMaxBacklog |
integer |
Sysctl 设置net.core.netdev_max_backlog。 |
netCoreOptmemMax |
integer |
Sysctl 设置net.core.optmem_max。 |
netCoreRmemDefault |
integer |
Sysctl 设置net.core.rmem_default。 |
netCoreRmemMax |
integer |
Sysctl 设置net.core.rmem_max。 |
netCoreSomaxconn |
integer |
Sysctl setting net.core.somaxconn。 |
netCoreWmemDefault |
integer |
Sysctl 设置net.core.wmem_default。 |
netCoreWmemMax |
integer |
Sysctl 设置net.core.wmem_max。 |
netIpv4IpLocalPortRange |
string |
Sysctl 设置net.ipv4.ip_local_port_range。 |
netIpv4NeighDefaultGcThresh1 |
integer |
Sysctl 设置net.ipv4.neigh.default.gc_thresh1。 |
netIpv4NeighDefaultGcThresh2 |
integer |
Sysctl 设置net.ipv4.neigh.default.gc_thresh2。 |
netIpv4NeighDefaultGcThresh3 |
integer |
Sysctl 设置net.ipv4.neigh.default.gc_thresh3。 |
netIpv4TcpFinTimeout |
integer |
Sysctl 设置net.ipv4.tcp_fin_timeout。 |
netIpv4TcpKeepaliveProbes |
integer |
Sysctl 设置net.ipv4.tcp_keepalive_probes。 |
netIpv4TcpKeepaliveTime |
integer |
Sysctl 设置net.ipv4.tcp_keepalive_time。 |
netIpv4TcpMaxSynBacklog |
integer |
Sysctl 设置net.ipv4.tcp_max_syn_backlog。 |
netIpv4TcpMaxTwBuckets |
integer |
Sysctl 设置net.ipv4.tcp_max_tw_buckets。 |
netIpv4TcpTwReuse |
boolean |
Sysctl 设置net.ipv4.tcp_tw_reuse。 |
netIpv4TcpkeepaliveIntvl |
integer |
Sysctl 设置net.ipv4.tcp_keepalive_intvl。 |
netNetfilterNfConntrackBuckets |
integer |
Sysctl 设置net.netfilter.nf_conntrack_buckets。 |
netNetfilterNfConntrackMax |
integer |
Sysctl 设置net.netfilter.nf_conntrack_max。 |
vmMaxMapCount |
integer |
Sysctl 设置 vm.max_map_count。 |
vmSwappiness |
integer |
Sysctl 设置 vm.swappiness。 |
vmVfsCachePressure |
integer |
Sysctl 设置vm.vfs_cache_pressure。 |
WorkloadRuntime
确定节点可以运行的工作负荷类型。
名称 | 类型 | 说明 |
---|---|---|
OCIContainer |
string |
节点将使用 Kubelet 运行标准 OCI 容器工作负载。 |
WasmWasi |
string |
节点将使用 Krustlet 通过 WASI 提供程序 (预览版) 运行 WASM 工作负载。 |