Belirtilen yönetilen kümede bir aracı havuzu oluşturur veya güncelleştirir.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}?api-version=2026-05-01
URI Parametreleri
| Name |
İçinde |
Gerekli |
Tür |
Description |
|
agentPoolName
|
path |
True
|
string
minLength: 1 maxLength: 12 pattern: ^[a-z][a-z0-9]{0,11}$
|
Aracı havuzunun adı.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Kaynak grubunun adı. İsim büyük/küçük harfe duyarsızdır.
|
|
resourceName
|
path |
True
|
string
minLength: 1 maxLength: 63 pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$
|
Yönetilen küme kaynağının adı.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Bu işlem için kullanılacak API sürümü.
|
| Name |
Gerekli |
Tür |
Description |
|
if-match
|
|
string
|
İsteğin devam etmesi için bir varlığın bu dizeyle eşleşmesi gerekir.
|
|
if-none-match
|
|
string
|
İsteğin devam etmesi için bu dizeyle eşleşen bir varlık olmaması gerekir.
|
İstek Gövdesi
| Name |
Tür |
Description |
|
properties.artifactStreamingProfile
|
AgentPoolArtifactStreamingProfile
|
AKS'de yapıt akışını kullanmak için yapılandırma.
|
|
properties.availabilityZones
|
string[]
|
Düğümler için kullanılacak Kullanılabilirlik alanlarının listesi. Bu yalnızca AgentPoolType özelliği 'VirtualMachineScaleSets' olduğunda belirtilebilir.
|
|
properties.capacityReservationGroupID
|
string
(arm-id)
|
Kapasite Rezervasyon Grubu'nun tam nitelikli kaynak kimliği, ayrılmış bir Sanal Makine grubundan sanal makineler sağlamak için. Bu şu şekildedir: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Müşteriler belirli bir CRG ile bir ajan havuzu oluşturmak için bunu kullanır. Daha fazla bilgi için Kapasite Rezervasyonu'na bakınız
|
|
properties.count
|
integer
(int32)
|
Docker kapsayıcılarını barındıracak aracıların (VM) sayısı. İzin verilen değerler, kullanıcı havuzları için 0 ile 1000 (dahil) arasında ve sistem havuzları için 1 ile 1000 (dahil) arasında olmalıdır. Varsayılan değer 1'dir.
|
|
properties.creationData
|
CreationData
|
Düğüm havuzu bir anlık görüntü kullanılarak oluşturulacak/yükseltilecekse kaynak Anlık Görüntü Kimliğini belirtmek için kullanılacak CreationData.
|
|
properties.enableAutoScaling
|
boolean
|
Otomatik ölçeklendiricinin etkinleştirilip etkinleştirilmeyileceği
|
|
properties.enableEncryptionAtHost
|
boolean
|
Konak tabanlı işletim sisteminin ve veri sürücüsü şifrelemenin etkinleştirilip etkinleştirilmeyileceği. Bu yalnızca belirli VM boyutlarında ve belirli Azure bölgelerinde desteklenir. Daha fazla bilgi için, şuraya bakın: https://docs.microsoft.com/azure/aks/enable-host-encryption
|
|
properties.enableFIPS
|
boolean
|
FIPS özellikli işletim sisteminin kullanılıp kullanılmaymayacağı. Daha fazla ayrıntı için bkz. FIPS özellikli düğüm havuzu ekleme .
|
|
properties.enableNodePublicIP
|
boolean
|
Her düğümün kendi genel IP'sini ayırıp ayırmadığı. Bazı senaryolar, düğüm havuzundaki düğümlerin kendi ayrılmış genel IP adreslerini almasını gerektirebilir. Yaygın bir senaryo, konsolun atlamaları en aza indirmek için bulut sanal makinesine doğrudan bağlantı sağlaması gereken oyun iş yüklerine yöneliktir. Daha fazla bilgi için bkz. Düğüm başına genel IP atama. Varsayılan değer false'tur.
|
|
properties.enableUltraSSD
|
boolean
|
UltraSSD'nin etkinleştirilip etkinleştirilmeyileceği
|
|
properties.gatewayProfile
|
AgentPoolGatewayProfile
|
Ağ geçidi modunda yönetilen aracı havuzuna özgü profil. Aracı havuzu modu Ağ Geçidi değilse bu alan ayarlanamaz.
|
|
properties.gpuInstanceProfile
|
GPUInstanceProfile
|
Desteklenen GPU VM SKU'su için GPU MIG örnek profilini belirtmek üzere kullanılacak GPUInstanceProfile.
|
|
properties.gpuProfile
|
GPUProfile
|
Aracı Havuzu için GPU ayarları.
|
|
properties.hostGroupID
|
string
(arm-id)
|
Sanal makinelerin sağlanacağı Ayrılmış Konak Grubunun tam kaynak kimliği, yalnızca oluşturma senaryosunda kullanılır ve bir kez ayarlandıktan sonra değiştirilmesine izin verilmez. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. Daha fazla bilgi için bkz. Azure ayrılmış konakları.
|
|
properties.kubeletConfig
|
KubeletConfig
|
Aracı havuzu düğümlerinde Kubelet yapılandırması.
|
|
properties.kubeletDiskType
|
KubeletDiskType
|
emptyDir birimlerinin, kapsayıcı çalışma zamanı veri kökünün ve Kubelet kısa ömürlü depolamanın yerleşimini belirler.
|
|
properties.linuxOSConfig
|
LinuxOSConfig
|
Linux aracı düğümlerinin işletim sistemi yapılandırması.
|
|
properties.localDNSProfile
|
LocalDNSProfile
|
VnetDNS ve KubeDNS geçersiz kılmaları ile düğüm başına yerel DNS'yi yapılandırır. LocalDNS, bir AKS kümesinde DNS çözümlemesinin performansını ve güvenilirliğini artırmaya yardımcı olur. Daha fazla ayrıntı için aka.ms/aks/localdns bakın.
|
|
properties.maxCount
|
integer
(int32)
|
Otomatik ölçeklendirme için en fazla düğüm sayısı
|
|
properties.maxPods
|
integer
(int32)
|
Bir düğümde çalışabilecek en fazla pod sayısı.
|
|
properties.messageOfTheDay
|
string
|
Base64 kodlu Linux düğümleri için günün iletisi. Kod çözmeden sonra /etc/motd öğesine yazılacak base64 kodlanmış bir dize. Bu, Linux düğümleri için günün iletisinin özelleştirilmesini sağlar. Windows düğümleri için belirtilmemelidir. Statik bir dize olmalıdır (örneğin, ham olarak yazdırılır ve betik olarak yürütülmeyecektir).
|
|
properties.minCount
|
integer
(int32)
|
Otomatik ölçeklendirme için en az düğüm sayısı
|
|
properties.mode
|
AgentPoolMode
|
Aracı havuzunun modu. Bir kümenin her zaman en az bir 'Sistem' Aracı Havuzu olmalıdır. Aracı havuzu kısıtlamaları ve en iyi yöntemler hakkında ek bilgi için bkz. https://docs.microsoft.com/azure/aks/use-system-pools
|
|
properties.networkProfile
|
AgentPoolNetworkProfile
|
Aracı havuzunun ağ ile ilgili ayarları.
|
|
properties.nodeImageVersion
|
string
|
Düğüm görüntüsünün versiyonu. Bu değeri ayarlamak, agentPool geri dönüşünü tetikler.
Sadece değerler için izin recentlyUsedVersions verilir.
|
|
properties.nodeLabels
|
object
|
Aracı havuzundaki tüm düğümlerde kalıcı hale getirmek için düğüm etiketleri.
|
|
properties.nodePublicIPPrefixID
|
string
(arm-id)
|
VM düğümlerinin IP'lerini kullanması gereken genel IP ön ek kimliği. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
|
|
properties.nodeTaints
|
string[]
|
Düğüm havuzu oluşturma ve ölçeklendirme sırasında yeni düğümlere eklenen renk tonları. Örneğin, key=value:NoSchedule.
|
|
properties.orchestratorVersion
|
string
|
Kullanıcı tarafından belirtilen Kubernetes sürümü. Hem yama sürümü <major.minor.patch> (örneğin, 1.20.13) hem de <major.minor> (örneğin 1.20) desteklenir.
<major.minor> belirtildiğinde, desteklenen en son GA düzeltme eki sürümü otomatik olarak seçilir. Küme oluşturulduktan sonra aynı <major.minor> ile güncelleştirilmesi (örneğin, 1.14.x -> 1.14) daha yeni bir düzeltme eki sürümü kullanılabilir olsa bile yükseltme tetiklemez. En iyi yöntem olarak, AKS kümesindeki tüm düğüm havuzlarını aynı Kubernetes sürümüne yükseltmeniz gerekir. Düğüm havuzu sürümü, denetim düzlemi ile aynı ana sürüme sahip olmalıdır. Düğüm havuzu ikincil sürümü, denetim düzlemi sürümünün iki ikincil sürümünde olmalıdır. Düğüm havuzu sürümü, denetim düzlemi sürümünden büyük olamaz. Daha fazla bilgi için bkz. Düğüm havuzunu yükseltme.
|
|
properties.osDiskSizeGB
|
integer
(int32)
minimum: 0 maximum: 2048
|
Ana/aracı havuzundaki her makine için disk boyutunu belirtmek için kullanılacak GB cinsinden işletim sistemi Disk Boyutu. 0 belirtirseniz, belirtilen vmSize değerine göre varsayılan osDisk boyutunu uygular.
|
|
properties.osDiskType
|
OSDiskType
|
Aracı havuzundaki makineler için kullanılacak işletim sistemi disk türü. VM destekliyorsa ve istenen OSDiskSizeGB değerinden daha büyük bir önbellek diske sahipse varsayılan değer 'Kısa Ömürlü'dür. Aksi takdirde, varsayılan olarak 'Yönetilen' olarak gösterilir. Oluşturulduktan sonra değiştirilemez. Daha fazla bilgi için bkz. kısa ömürlü işletim sistemi .
|
|
properties.osSKU
|
OSSKU
|
Aracı havuzu tarafından kullanılan işletim sistemi SKU'su belirtir. OSType Linux ise varsayılan değer Ubuntu'dur. OSType Windows ise, Kubernetes <= 1,24 veya Windows2022 olduğunda varsayılan >değer Windows2019'dur.
|
|
properties.osType
|
OSType
|
İşletim sistemi türü. Varsayılan değer Linux'tır.
|
|
properties.podIPAllocationMode
|
PodIPAllocationMode
|
Pod IP Ayırma Modu. Aracı havuzundaki podlar için IP ayırma modu. podSubnetId ile kullanılmalıdır. Varsayılan değer :'DynamicIndividual'.
|
|
properties.podSubnetID
|
string
(arm-id)
|
Podların başlatıldığında birleştirileceği alt ağın kimliği. Atlanırsa pod IP'leri düğüm alt ağından statik olarak atanır (daha fazla ayrıntı için bkz. vnetSubnetID). Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
|
|
properties.powerState
|
PowerState
|
Aracı Havuzunun çalışıp çalışmadığı veya durdurulduğu. Bir Aracı Havuzu ilk oluşturulduğunda başlangıçta Çalışıyor olur. Aracı Havuzu, bu alan Durduruldu olarak ayarlanarak durdurulabilir. Durdurulan Aracı Havuzu tüm VM'lerini durdurur ve faturalama ücretlerini tahakkuk etmez. Aracı Havuzu yalnızca Çalışıyor ve sağlama durumu Başarılı olduğunda durdurulabilir
|
|
properties.proximityPlacementGroupID
|
string
(arm-id)
|
YakınLık Yerleştirme Grubu kimliği.
|
|
properties.scaleDownMode
|
ScaleDownMode
|
Aracı Havuzunu ölçeklendirirken kullanılacak ölçeği azaltma modu. Bu, küme otomatik ölçeklendirici davranışını da etkiler. Belirtilmezse, varsayılan olarak Delete olur.
|
|
properties.scaleSetEvictionPolicy
|
ScaleSetEvictionPolicy
|
Sanal Makine Ölçek Kümesi çıkarma ilkesi. Çıkarma ilkesi, çıkarıldığında VM ile ne yapılacağını belirtir. Varsayılan değer Sil'dir. Çıkarma hakkında daha fazla bilgi için bkz.
|
|
properties.scaleSetPriority
|
ScaleSetPriority
|
Sanal Makine Ölçek Kümesi önceliği.
|
|
properties.securityProfile
|
AgentPoolSecurityProfile
|
Aracı havuzunun güvenlik ayarları.
|
|
properties.spotMaxPrice
|
number
(float)
|
Spot örnekler için ödeme yapmak istediğiniz maksimum fiyat (ABD Doları cinsinden). Olası değerler, varsayılan fiyatın isteğe bağlı olarak up-to belirten sıfırdan büyük veya -1 herhangi bir ondalık değerdir. Olası değerler, herhangi bir isteğe bağlı fiyat ödemeye istekli olduğunu gösteren sıfırdan veya -1 büyük herhangi bir ondalık değerdir. Spot fiyatlandırma hakkında daha fazla bilgi için bkz. spot VM fiyatlandırması
|
|
properties.status
|
AgentPoolStatus
|
Aracı Havuzu hakkında salt okunur bilgiler içerir.
|
|
properties.tags
|
object
|
Aracı havuzu sanal makine ölçek kümesinde kalıcı hale eklenecek etiketler.
|
|
properties.type
|
AgentPoolType
|
Aracı Havuzu türü.
|
|
properties.upgradeSettings
|
AgentPoolUpgradeSettings
|
Aracı havuzunu yükseltme ayarları
|
|
properties.virtualMachineNodesStatus
|
VirtualMachineNodes[]
|
VirtualMachines aracı havuzundaki düğümlerin durumu.
|
|
properties.virtualMachinesProfile
|
VirtualMachinesProfile
|
VirtualMachines aracı havuzundaki belirtimler.
|
|
properties.vmSize
|
string
|
Aracı havuzu VM'lerinin boyutu. VM boyutu kullanılabilirliği bölgeye göre değişir. Düğüm yetersiz işlem kaynakları (bellek, cpu vb.) içeriyorsa podlar düzgün çalışmayabilir. Kısıtlanmış VM boyutları hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/azure/aks/quotas-skus-regions
|
|
properties.vnetSubnetID
|
string
(arm-id)
|
Aracı havuzu düğümlerinin ve isteğe bağlı olarak podların başlangıçta birleştirileceği alt ağın kimliği. Bu belirtilmezse, bir sanal ağ ve alt ağ oluşturulur ve kullanılır. PodSubnetID belirtilmezse, bu düğümler ve podlar için geçerlidir, aksi takdirde yalnızca düğümler için geçerlidir. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
|
|
properties.windowsProfile
|
AgentPoolWindowsProfile
|
Windows aracı havuzunun belirli profili.
|
|
properties.workloadRuntime
|
WorkloadRuntime
|
Bir düğümün çalıştırabileceği iş yükü türünü belirler.
|
Yanıtlar
| Name |
Tür |
Description |
|
200 OK
|
AgentPool
|
Kaynak 'AgentPool' güncelleştirme işlemi başarılı oldu
|
|
201 Created
|
AgentPool
|
Kaynak 'AgentPool' oluşturma işlemi başarılı oldu
Üst Bilgiler
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Beklenmeyen bir hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name |
Description |
|
user_impersonation
|
kullanıcı hesabınızı taklit etme
|
Örnekler
Create Agent Pool using an agent pool snapshot
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"creationData": {
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"
},
"enableFIPS": true,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.CreationData;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Snapshot.json
*/
/**
* Sample code: Create Agent Pool using an agent pool snapshot.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolUsingAnAgentPoolSnapshot(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner()
.withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("")
.withEnableFips(true)
.withCreationData(new CreationData().withSourceResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"creationData": {
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"
},
"enableFIPS": True,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_Snapshot.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_Snapshot.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
CreationData: &armcontainerservice.CreationData{
SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"),
},
EnableFIPS: to.Ptr(true),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CreationData: &armcontainerservice.CreationData{
// SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"),
// },
// CurrentOrchestratorVersion: to.Ptr("1.19.6"),
// EnableFIPS: to.Ptr(true),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.19.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Snapshot.json
*/
async function createAgentPoolUsingAnAgentPoolSnapshot() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
creationData: {
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1",
},
enableFips: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"creationData": {
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"
},
"currentOrchestratorVersion": "1.19.6",
"enableFIPS": true,
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"creationData": {
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"
},
"currentOrchestratorVersion": "1.19.6",
"enableFIPS": true,
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with Capacity Reservation Group
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1",
"count": 3,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_CRG.json
*/
/**
* Sample code: Create Agent Pool with Capacity Reservation Group.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithCapacityReservationGroup(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner()
.withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("")
.withCapacityReservationGroupId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_crg.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1",
"count": 3,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_CRG.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_CRG.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCapacityReservationGroup() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"),
Count: to.Ptr[int32](3),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"),
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_CRG.json
*/
async function createAgentPoolWithCapacityReservationGroup() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
capacityReservationGroupID:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1",
count: 3,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1",
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1",
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with Dedicated Host Group
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"hostGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1",
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_DedicatedHostGroup.json
*/
/**
* Sample code: Create Agent Pool with Dedicated Host Group.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithDedicatedHostGroup(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner()
.withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("")
.withHostGroupId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_dedicated_host_group.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"hostGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1",
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_DedicatedHostGroup.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_DedicatedHostGroup.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHostGroup() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
HostGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// HostGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.19.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_DedicatedHostGroup.json
*/
async function createAgentPoolWithDedicatedHostGroup() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
hostGroupID:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1",
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"hostGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1",
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"hostGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1",
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with EncryptionAtHost enabled
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"enableEncryptionAtHost": true,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableEncryptionAtHost.json
*/
/**
* Sample code: Create Agent Pool with EncryptionAtHost enabled.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithEncryptionAtHostEnabled(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX)
.withOrchestratorVersion("").withEnableEncryptionAtHost(true),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_enable_encryption_at_host.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"enableEncryptionAtHost": True,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableEncryptionAtHost.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_EnableEncryptionAtHost.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAtHostEnabled() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
EnableEncryptionAtHost: to.Ptr(true),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.13"),
// EnableEncryptionAtHost: to.Ptr(true),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.13"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableEncryptionAtHost.json
*/
async function createAgentPoolWithEncryptionAtHostEnabled() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
enableEncryptionAtHost: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.13",
"enableEncryptionAtHost": true,
"maxPods": 110,
"orchestratorVersion": "1.17.13",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.13",
"enableEncryptionAtHost": true,
"maxPods": 110,
"orchestratorVersion": "1.17.13",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with Ephemeral OS Disk
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osDiskType": "Ephemeral",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSDiskType;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Ephemeral.json
*/
/**
* Sample code: Create Agent Pool with Ephemeral OS Disk.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithEphemeralOSDisk(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64)
.withOsDiskType(OSDiskType.EPHEMERAL).withOsType(OSType.LINUX).withOrchestratorVersion(""),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_ephemeral.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osDiskType": "Ephemeral",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_Ephemeral.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_Ephemeral.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOSDisk() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
OrchestratorVersion: to.Ptr(""),
OSDiskSizeGB: to.Ptr[int32](64),
OSDiskType: to.Ptr(armcontainerservice.OSDiskTypeEphemeral),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSDiskSizeGB: to.Ptr[int32](64),
// OSDiskType: to.Ptr(armcontainerservice.OSDiskTypeEphemeral),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Ephemeral.json
*/
async function createAgentPoolWithEphemeralOSDisk() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
orchestratorVersion: "",
osDiskSizeGB: 64,
osDiskType: "Ephemeral",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osDiskType": "Ephemeral",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"kubeletDiskType": "OS",
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osDiskType": "Ephemeral",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with FIPS enabled OS
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"enableFIPS": true,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableFIPS.json
*/
/**
* Sample code: Create Agent Pool with FIPS enabled OS.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithFIPSEnabledOS(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate(
"rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2")
.withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableFips(true),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_enable_fips.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"enableFIPS": True,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableFIPS.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_EnableFIPS.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledOS() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
EnableFIPS: to.Ptr(true),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.19.6"),
// EnableFIPS: to.Ptr(true),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.19.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableFIPS.json
*/
async function createAgentPoolWithFipsEnabledOS() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
enableFips: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.19.6",
"enableFIPS": true,
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.19.6",
"enableFIPS": true,
"maxPods": 110,
"orchestratorVersion": "1.19.6",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with GPUMIG
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"gpuInstanceProfile": "MIG2g",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_ND96asr_v4"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile;
import com.azure.resourcemanager.containerservice.models.KubeletConfig;
import com.azure.resourcemanager.containerservice.models.LinuxOSConfig;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.SysctlConfig;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_GPUMIG.json
*/
/**
* Sample code: Create Agent Pool with GPUMIG.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithGPUMIG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_ND96asr_v4").withOsType(OSType.LINUX)
.withOrchestratorVersion("")
.withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static").withCpuCfsQuota(true)
.withCpuCfsQuotaPeriod("200ms").withImageGcHighThreshold(90).withImageGcLowThreshold(70)
.withTopologyManagerPolicy("best-effort")
.withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")).withFailSwapOn(false))
.withLinuxOSConfig(new LinuxOSConfig()
.withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345).withNetIpv4TcpTwReuse(true)
.withNetIpv4IpLocalPortRange("20000 60000").withKernelThreadsMax(99999))
.withTransparentHugePageEnabled("always").withTransparentHugePageDefrag("madvise")
.withSwapFileSizeMB(1500))
.withGpuInstanceProfile(GpuInstanceProfile.MIG2G),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_gpumig.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"gpuInstanceProfile": "MIG2g",
"kubeletConfig": {
"allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"],
"cpuCfsQuota": True,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": False,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort",
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": True,
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always",
},
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_ND96asr_v4",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_GPUMIG.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_GPUMIG.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG2G),
KubeletConfig: &armcontainerservice.KubeletConfig{
AllowedUnsafeSysctls: []*string{
to.Ptr("kernel.msg*"),
to.Ptr("net.core.somaxconn"),
},
CPUCfsQuota: to.Ptr(true),
CPUCfsQuotaPeriod: to.Ptr("200ms"),
CPUManagerPolicy: to.Ptr("static"),
FailSwapOn: to.Ptr(false),
ImageGcHighThreshold: to.Ptr[int32](90),
ImageGcLowThreshold: to.Ptr[int32](70),
TopologyManagerPolicy: to.Ptr("best-effort"),
},
LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
SwapFileSizeMB: to.Ptr[int32](1500),
Sysctls: &armcontainerservice.SysctlConfig{
KernelThreadsMax: to.Ptr[int32](99999),
NetCoreWmemDefault: to.Ptr[int32](12345),
NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
NetIPv4TCPTwReuse: to.Ptr(true),
},
TransparentHugePageDefrag: to.Ptr("madvise"),
TransparentHugePageEnabled: to.Ptr("always"),
},
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_ND96asr_v4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG2G),
// KubeletConfig: &armcontainerservice.KubeletConfig{
// AllowedUnsafeSysctls: []*string{
// to.Ptr("kernel.msg*"),
// to.Ptr("net.core.somaxconn"),
// },
// CPUCfsQuota: to.Ptr(true),
// CPUCfsQuotaPeriod: to.Ptr("200ms"),
// CPUManagerPolicy: to.Ptr("static"),
// FailSwapOn: to.Ptr(false),
// ImageGcHighThreshold: to.Ptr[int32](90),
// ImageGcLowThreshold: to.Ptr[int32](70),
// TopologyManagerPolicy: to.Ptr("best-effort"),
// },
// LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
// SwapFileSizeMB: to.Ptr[int32](1500),
// Sysctls: &armcontainerservice.SysctlConfig{
// KernelThreadsMax: to.Ptr[int32](99999),
// NetCoreWmemDefault: to.Ptr[int32](12345),
// NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
// NetIPv4TCPTwReuse: to.Ptr(true),
// },
// TransparentHugePageDefrag: to.Ptr("madvise"),
// TransparentHugePageEnabled: to.Ptr("always"),
// },
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_ND96asr_v4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_GPUMIG.json
*/
async function createAgentPoolWithGpumig() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
gpuInstanceProfile: "MIG2g",
kubeletConfig: {
allowedUnsafeSysctls: ["kernel.msg*", "net.core.somaxconn"],
cpuCfsQuota: true,
cpuCfsQuotaPeriod: "200ms",
cpuManagerPolicy: "static",
failSwapOn: false,
imageGcHighThreshold: 90,
imageGcLowThreshold: 70,
topologyManagerPolicy: "best-effort",
},
linuxOSConfig: {
swapFileSizeMB: 1500,
sysctls: {
kernelThreadsMax: 99999,
netCoreWmemDefault: 12345,
netIpv4IpLocalPortRange: "20000 60000",
netIpv4TcpTwReuse: true,
},
transparentHugePageDefrag: "madvise",
transparentHugePageEnabled: "always",
},
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_ND96asr_v4",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"gpuInstanceProfile": "MIG2g",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_ND96asr_v4"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"gpuInstanceProfile": "MIG2g",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"podMaxPids": 100,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 65536,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_ND96asr_v4"
}
}
Create Agent Pool with Krustlet and the WASI runtime
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"mode": "User",
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
"workloadRuntime": "WasmWasi"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolMode;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.WorkloadRuntime;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WasmWasi.json
*/
/**
* Sample code: Create Agent Pool with Krustlet and the WASI runtime.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithKrustletAndTheWASIRuntime(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64)
.withWorkloadRuntime(WorkloadRuntime.WASM_WASI).withOsType(OSType.LINUX).withMode(AgentPoolMode.USER)
.withOrchestratorVersion(""),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_wasm_wasi.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"mode": "User",
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
"workloadRuntime": "WasmWasi",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_WasmWasi.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_WasmWasi.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndTheWasiRuntime() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
OrchestratorVersion: to.Ptr(""),
OSDiskSizeGB: to.Ptr[int32](64),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
WorkloadRuntime: to.Ptr(armcontainerservice.WorkloadRuntimeWasmWasi),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// MaxPods: to.Ptr[int32](110),
// Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSDiskSizeGB: to.Ptr[int32](64),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// WorkloadRuntime: to.Ptr(armcontainerservice.WorkloadRuntimeWasmWasi),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WasmWasi.json
*/
async function createAgentPoolWithKrustletAndTheWasiRuntime() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
mode: "User",
orchestratorVersion: "",
osDiskSizeGB: 64,
osType: "Linux",
vmSize: "Standard_DS2_v2",
workloadRuntime: "WasmWasi",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"maxPods": 110,
"mode": "User",
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2",
"workloadRuntime": "WasmWasi"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"maxPods": 110,
"mode": "User",
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2",
"workloadRuntime": "WasmWasi"
}
}
Create Agent Pool with KubeletConfig and LinuxOSConfig
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.KubeletConfig;
import com.azure.resourcemanager.containerservice.models.LinuxOSConfig;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.SysctlConfig;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_CustomNodeConfig.json
*/
/**
* Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX)
.withOrchestratorVersion("")
.withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static").withCpuCfsQuota(true)
.withCpuCfsQuotaPeriod("200ms").withImageGcHighThreshold(90).withImageGcLowThreshold(70)
.withTopologyManagerPolicy("best-effort")
.withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")).withFailSwapOn(false))
.withLinuxOSConfig(new LinuxOSConfig()
.withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345).withNetIpv4TcpTwReuse(true)
.withNetIpv4IpLocalPortRange("20000 60000").withKernelThreadsMax(99999))
.withTransparentHugePageEnabled("always").withTransparentHugePageDefrag("madvise")
.withSwapFileSizeMB(1500)),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_custom_node_config.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"kubeletConfig": {
"allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"],
"cpuCfsQuota": True,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": False,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort",
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": True,
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always",
},
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_CustomNodeConfig.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_CustomNodeConfig.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfigAndLinuxOSConfig() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
KubeletConfig: &armcontainerservice.KubeletConfig{
AllowedUnsafeSysctls: []*string{
to.Ptr("kernel.msg*"),
to.Ptr("net.core.somaxconn"),
},
CPUCfsQuota: to.Ptr(true),
CPUCfsQuotaPeriod: to.Ptr("200ms"),
CPUManagerPolicy: to.Ptr("static"),
FailSwapOn: to.Ptr(false),
ImageGcHighThreshold: to.Ptr[int32](90),
ImageGcLowThreshold: to.Ptr[int32](70),
TopologyManagerPolicy: to.Ptr("best-effort"),
},
LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
SwapFileSizeMB: to.Ptr[int32](1500),
Sysctls: &armcontainerservice.SysctlConfig{
KernelThreadsMax: to.Ptr[int32](99999),
NetCoreWmemDefault: to.Ptr[int32](12345),
NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
NetIPv4TCPTwReuse: to.Ptr(true),
},
TransparentHugePageDefrag: to.Ptr("madvise"),
TransparentHugePageEnabled: to.Ptr("always"),
},
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// KubeletConfig: &armcontainerservice.KubeletConfig{
// AllowedUnsafeSysctls: []*string{
// to.Ptr("kernel.msg*"),
// to.Ptr("net.core.somaxconn"),
// },
// CPUCfsQuota: to.Ptr(true),
// CPUCfsQuotaPeriod: to.Ptr("200ms"),
// CPUManagerPolicy: to.Ptr("static"),
// FailSwapOn: to.Ptr(false),
// ImageGcHighThreshold: to.Ptr[int32](90),
// ImageGcLowThreshold: to.Ptr[int32](70),
// TopologyManagerPolicy: to.Ptr("best-effort"),
// },
// LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
// SwapFileSizeMB: to.Ptr[int32](1500),
// Sysctls: &armcontainerservice.SysctlConfig{
// KernelThreadsMax: to.Ptr[int32](99999),
// NetCoreWmemDefault: to.Ptr[int32](12345),
// NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
// NetIPv4TCPTwReuse: to.Ptr(true),
// },
// TransparentHugePageDefrag: to.Ptr("madvise"),
// TransparentHugePageEnabled: to.Ptr("always"),
// },
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_CustomNodeConfig.json
*/
async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
kubeletConfig: {
allowedUnsafeSysctls: ["kernel.msg*", "net.core.somaxconn"],
cpuCfsQuota: true,
cpuCfsQuotaPeriod: "200ms",
cpuManagerPolicy: "static",
failSwapOn: false,
imageGcHighThreshold: 90,
imageGcLowThreshold: 70,
topologyManagerPolicy: "best-effort",
},
linuxOSConfig: {
swapFileSizeMB: 1500,
sysctls: {
kernelThreadsMax: 99999,
netCoreWmemDefault: 12345,
netIpv4IpLocalPortRange: "20000 60000",
netIpv4TcpTwReuse: true,
},
transparentHugePageDefrag: "madvise",
transparentHugePageEnabled: "always",
},
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"podMaxPids": 100,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 65536,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with Message of the Day
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"messageOfTheDay": "Zm9vCg==",
"mode": "User",
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolMode;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_MessageOfTheDay.json
*/
/**
* Sample code: Create Agent Pool with Message of the Day.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithMessageOfTheDay(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64)
.withMessageOfTheDay("Zm9vCg==").withOsType(OSType.LINUX).withMode(AgentPoolMode.USER)
.withOrchestratorVersion(""),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_message_of_the_day.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"messageOfTheDay": "Zm9vCg==",
"mode": "User",
"orchestratorVersion": "",
"osDiskSizeGB": 64,
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_MessageOfTheDay.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_MessageOfTheDay.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithMessageOfTheDay() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
MessageOfTheDay: to.Ptr("Zm9vCg=="),
Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
OrchestratorVersion: to.Ptr(""),
OSDiskSizeGB: to.Ptr[int32](64),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// MaxPods: to.Ptr[int32](110),
// MessageOfTheDay: to.Ptr("Zm9vCg=="),
// Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSDiskSizeGB: to.Ptr[int32](64),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_MessageOfTheDay.json
*/
async function createAgentPoolWithMessageOfTheDay() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
messageOfTheDay: "Zm9vCg==",
mode: "User",
orchestratorVersion: "",
osDiskSizeGB: 64,
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"maxPods": 110,
"messageOfTheDay": "Zm9vCg==",
"mode": "User",
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"maxPods": 110,
"messageOfTheDay": "Zm9vCg==",
"mode": "User",
"orchestratorVersion": "1.17.8",
"osDiskSizeGB": 64,
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with OSSKU
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"orchestratorVersion": "",
"osSKU": "AzureLinux",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.KubeletConfig;
import com.azure.resourcemanager.containerservice.models.LinuxOSConfig;
import com.azure.resourcemanager.containerservice.models.OSSku;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.SysctlConfig;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_OSSKU.json
*/
/**
* Sample code: Create Agent Pool with OSSKU.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX)
.withOsSku(OSSku.AZURE_LINUX).withOrchestratorVersion("")
.withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static").withCpuCfsQuota(true)
.withCpuCfsQuotaPeriod("200ms").withImageGcHighThreshold(90).withImageGcLowThreshold(70)
.withTopologyManagerPolicy("best-effort")
.withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")).withFailSwapOn(false))
.withLinuxOSConfig(new LinuxOSConfig()
.withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345).withNetIpv4TcpTwReuse(true)
.withNetIpv4IpLocalPortRange("20000 60000").withKernelThreadsMax(99999))
.withTransparentHugePageEnabled("always").withTransparentHugePageDefrag("madvise")
.withSwapFileSizeMB(1500)),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_ossku.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"kubeletConfig": {
"allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"],
"cpuCfsQuota": True,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": False,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort",
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": True,
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always",
},
"orchestratorVersion": "",
"osSKU": "AzureLinux",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_OSSKU.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_OSSKU.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
KubeletConfig: &armcontainerservice.KubeletConfig{
AllowedUnsafeSysctls: []*string{
to.Ptr("kernel.msg*"),
to.Ptr("net.core.somaxconn"),
},
CPUCfsQuota: to.Ptr(true),
CPUCfsQuotaPeriod: to.Ptr("200ms"),
CPUManagerPolicy: to.Ptr("static"),
FailSwapOn: to.Ptr(false),
ImageGcHighThreshold: to.Ptr[int32](90),
ImageGcLowThreshold: to.Ptr[int32](70),
TopologyManagerPolicy: to.Ptr("best-effort"),
},
LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
SwapFileSizeMB: to.Ptr[int32](1500),
Sysctls: &armcontainerservice.SysctlConfig{
KernelThreadsMax: to.Ptr[int32](99999),
NetCoreWmemDefault: to.Ptr[int32](12345),
NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
NetIPv4TCPTwReuse: to.Ptr(true),
},
TransparentHugePageDefrag: to.Ptr("madvise"),
TransparentHugePageEnabled: to.Ptr("always"),
},
OrchestratorVersion: to.Ptr(""),
OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.8"),
// KubeletConfig: &armcontainerservice.KubeletConfig{
// AllowedUnsafeSysctls: []*string{
// to.Ptr("kernel.msg*"),
// to.Ptr("net.core.somaxconn"),
// },
// CPUCfsQuota: to.Ptr(true),
// CPUCfsQuotaPeriod: to.Ptr("200ms"),
// CPUManagerPolicy: to.Ptr("static"),
// FailSwapOn: to.Ptr(false),
// ImageGcHighThreshold: to.Ptr[int32](90),
// ImageGcLowThreshold: to.Ptr[int32](70),
// TopologyManagerPolicy: to.Ptr("best-effort"),
// },
// LinuxOSConfig: &armcontainerservice.LinuxOSConfig{
// SwapFileSizeMB: to.Ptr[int32](1500),
// Sysctls: &armcontainerservice.SysctlConfig{
// KernelThreadsMax: to.Ptr[int32](99999),
// NetCoreWmemDefault: to.Ptr[int32](12345),
// NetIPv4IPLocalPortRange: to.Ptr("20000 60000"),
// NetIPv4TCPTwReuse: to.Ptr(true),
// },
// TransparentHugePageDefrag: to.Ptr("madvise"),
// TransparentHugePageEnabled: to.Ptr("always"),
// },
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.8"),
// OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_OSSKU.json
*/
async function createAgentPoolWithOssku() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
kubeletConfig: {
allowedUnsafeSysctls: ["kernel.msg*", "net.core.somaxconn"],
cpuCfsQuota: true,
cpuCfsQuotaPeriod: "200ms",
cpuManagerPolicy: "static",
failSwapOn: false,
imageGcHighThreshold: 90,
imageGcLowThreshold: 70,
topologyManagerPolicy: "best-effort",
},
linuxOSConfig: {
swapFileSizeMB: 1500,
sysctls: {
kernelThreadsMax: 99999,
netCoreWmemDefault: 12345,
netIpv4IpLocalPortRange: "20000 60000",
netIpv4TcpTwReuse: true,
},
transparentHugePageDefrag: "madvise",
transparentHugePageEnabled: "always",
},
orchestratorVersion: "",
osSKU: "AzureLinux",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 12345,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osSKU": "AzureLinux",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.8",
"kubeletConfig": {
"allowedUnsafeSysctls": [
"kernel.msg*",
"net.core.somaxconn"
],
"cpuCfsQuota": true,
"cpuCfsQuotaPeriod": "200ms",
"cpuManagerPolicy": "static",
"failSwapOn": false,
"imageGcHighThreshold": 90,
"imageGcLowThreshold": 70,
"podMaxPids": 100,
"topologyManagerPolicy": "best-effort"
},
"linuxOSConfig": {
"swapFileSizeMB": 1500,
"sysctls": {
"kernelThreadsMax": 99999,
"netCoreWmemDefault": 65536,
"netIpv4IpLocalPortRange": "20000 60000",
"netIpv4TcpTwReuse": true
},
"transparentHugePageDefrag": "madvise",
"transparentHugePageEnabled": "always"
},
"maxPods": 110,
"orchestratorVersion": "1.17.8",
"osSKU": "AzureLinux",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with PPG
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"orchestratorVersion": "",
"osType": "Linux",
"proximityPlacementGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_PPG.json
*/
/**
* Sample code: Create Agent Pool with PPG.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner()
.withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("")
.withProximityPlacementGroupId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_ppg.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"orchestratorVersion": "",
"osType": "Linux",
"proximityPlacementGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_PPG.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_PPG.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
ProximityPlacementGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// ProximityPlacementGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_PPG.json
*/
async function createAgentPoolWithPPG() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
orchestratorVersion: "",
osType: "Linux",
proximityPlacementGroupID:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"proximityPlacementGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Creating",
"proximityPlacementGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with UltraSSD enabled
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"enableUltraSSD": true,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableUltraSSD.json
*/
/**
* Sample code: Create Agent Pool with UltraSSD enabled.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithUltraSSDEnabled(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate(
"rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3).withVmSize("Standard_DS2_v2")
.withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableUltraSsd(true),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_enable_ultra_ssd.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"enableUltraSSD": True,
"orchestratorVersion": "",
"osType": "Linux",
"vmSize": "Standard_DS2_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableUltraSSD.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_EnableUltraSSD.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnabled() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
EnableUltraSSD: to.Ptr(true),
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
VMSize: to.Ptr("Standard_DS2_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.17.13"),
// EnableUltraSSD: to.Ptr(true),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.17.13"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_DS2_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_EnableUltraSSD.json
*/
async function createAgentPoolWithUltraSSDEnabled() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
enableUltraSSD: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.13",
"enableUltraSSD": true,
"maxPods": 110,
"orchestratorVersion": "1.17.13",
"osType": "Linux",
"provisioningState": "Succeeded",
"vmSize": "Standard_DS2_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.17.13",
"enableUltraSSD": true,
"maxPods": 110,
"orchestratorVersion": "1.17.13",
"osType": "Linux",
"provisioningState": "Creating",
"vmSize": "Standard_DS2_v2"
}
}
Create Agent Pool with VirtualMachines pool type
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"type": "VirtualMachines",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"tags": {
"name1": "val1"
},
"virtualMachinesProfile": {
"scale": {
"manual": [
{
"count": 3,
"size": "Standard_D2_v2"
},
{
"count": 2,
"size": "Standard_D2_v3"
}
]
}
}
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolType;
import com.azure.resourcemanager.containerservice.models.ManualScaleProfile;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.ScaleProfile;
import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines.json
*/
/**
* Sample code: Create Agent Pool with VirtualMachines pool type.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithVirtualMachinesPoolType(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withOsType(OSType.LINUX).withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES)
.withOrchestratorVersion("1.9.6").withTags(mapOf("name1", "val1"))
.withNodeLabels(mapOf("key1", "fakeTokenPlaceholder"))
.withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule"))
.withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile()
.withManual(Arrays.asList(new ManualScaleProfile().withSize("Standard_D2_v2").withCount(3),
new ManualScaleProfile().withSize("Standard_D2_v3").withCount(2))))),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_type_virtual_machines.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"nodeLabels": {"key1": "val1"},
"nodeTaints": ["Key1=Value1:NoSchedule"],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"tags": {"name1": "val1"},
"type": "VirtualMachines",
"virtualMachinesProfile": {
"scale": {
"manual": [{"count": 3, "size": "Standard_D2_v2"}, {"count": 2, "size": "Standard_D2_v3"}]
}
},
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachinesPoolType() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines),
NodeLabels: map[string]*string{
"key1": to.Ptr("val1"),
},
NodeTaints: []*string{
to.Ptr("Key1=Value1:NoSchedule"),
},
OrchestratorVersion: to.Ptr("1.9.6"),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
Tags: map[string]*string{
"name1": to.Ptr("val1"),
},
VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{
Scale: &armcontainerservice.ScaleProfile{
Manual: []*armcontainerservice.ManualScaleProfile{
{
Count: to.Ptr[int32](3),
Size: to.Ptr("Standard_D2_v2"),
},
{
Count: to.Ptr[int32](2),
Size: to.Ptr("Standard_D2_v3"),
},
},
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// MaxPods: to.Ptr[int32](110),
// NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"),
// NodeLabels: map[string]*string{
// "key1": to.Ptr("val1"),
// },
// NodeTaints: []*string{
// to.Ptr("Key1=Value1:NoSchedule"),
// },
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// Tags: map[string]*string{
// "name1": to.Ptr("val1"),
// },
// VirtualMachineNodesStatus: []*armcontainerservice.VirtualMachineNodes{
// {
// Count: to.Ptr[int32](3),
// Size: to.Ptr("Standard_D2_v2"),
// },
// {
// Count: to.Ptr[int32](2),
// Size: to.Ptr("Standard_D2_v3"),
// },
// },
// VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{
// Scale: &armcontainerservice.ScaleProfile{
// Manual: []*armcontainerservice.ManualScaleProfile{
// {
// Count: to.Ptr[int32](3),
// Size: to.Ptr("Standard_D2_v2"),
// },
// {
// Count: to.Ptr[int32](2),
// Size: to.Ptr("Standard_D2_v3"),
// },
// },
// },
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines.json
*/
async function createAgentPoolWithVirtualMachinesPoolType() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
typePropertiesType: "VirtualMachines",
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "1.9.6",
osType: "Linux",
tags: { name1: "val1" },
virtualMachinesProfile: {
scale: {
manual: [
{ count: 3, size: "Standard_D2_v2" },
{ count: 2, size: "Standard_D2_v3" },
],
},
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"type": "VirtualMachines",
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"tags": {
"name1": "val1"
},
"virtualMachineNodesStatus": [
{
"count": 3,
"size": "Standard_D2_v2"
},
{
"count": 2,
"size": "Standard_D2_v3"
}
],
"virtualMachinesProfile": {
"scale": {
"manual": [
{
"count": 3,
"size": "Standard_D2_v2"
},
{
"count": 2,
"size": "Standard_D2_v3"
}
]
}
}
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"type": "VirtualMachines",
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Creating",
"tags": {
"name1": "val1"
},
"virtualMachineNodesStatus": [
{
"count": 3,
"size": "Standard_D2_v2"
},
{
"count": 2,
"size": "Standard_D2_v3"
}
],
"virtualMachinesProfile": {
"scale": {
"manual": [
{
"count": 3,
"size": "Standard_D2_v2"
},
{
"count": 2,
"size": "Standard_D2_v3"
}
]
}
}
}
}
Create Agent Pool with VirtualMachines pool type with autoscaling enabled
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"type": "VirtualMachines",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.29.0",
"osType": "Linux",
"tags": {
"name1": "val1"
},
"virtualMachinesProfile": {
"scale": {
"autoscale": [
{
"maxCount": 5,
"minCount": 1,
"size": "Standard_D2_v2"
}
]
}
}
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolType;
import com.azure.resourcemanager.containerservice.models.AutoScaleProfile;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.ScaleProfile;
import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json
*/
/**
* Sample code: Create Agent Pool with VirtualMachines pool type with autoscaling enabled.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withOsType(OSType.LINUX).withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES)
.withOrchestratorVersion("1.29.0").withTags(mapOf("name1", "val1"))
.withNodeLabels(mapOf("key1", "fakeTokenPlaceholder"))
.withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule"))
.withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile().withAutoscale(
Arrays.asList(new AutoScaleProfile().withSize("Standard_D2_v2").withMinCount(1).withMaxCount(5))))),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_type_virtual_machines_autoscale.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"nodeLabels": {"key1": "val1"},
"nodeTaints": ["Key1=Value1:NoSchedule"],
"orchestratorVersion": "1.29.0",
"osType": "Linux",
"tags": {"name1": "val1"},
"type": "VirtualMachines",
"virtualMachinesProfile": {
"scale": {"autoscale": [{"maxCount": 5, "minCount": 1, "size": "Standard_D2_v2"}]}
},
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines),
NodeLabels: map[string]*string{
"key1": to.Ptr("val1"),
},
NodeTaints: []*string{
to.Ptr("Key1=Value1:NoSchedule"),
},
OrchestratorVersion: to.Ptr("1.29.0"),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
Tags: map[string]*string{
"name1": to.Ptr("val1"),
},
VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{
Scale: &armcontainerservice.ScaleProfile{
Autoscale: []*armcontainerservice.AutoScaleProfile{
{
MaxCount: to.Ptr[int32](5),
MinCount: to.Ptr[int32](1),
Size: to.Ptr("Standard_D2_v2"),
},
},
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines),
// CurrentOrchestratorVersion: to.Ptr("1.29.0"),
// MaxPods: to.Ptr[int32](110),
// NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"),
// NodeLabels: map[string]*string{
// "key1": to.Ptr("val1"),
// },
// NodeTaints: []*string{
// to.Ptr("Key1=Value1:NoSchedule"),
// },
// OrchestratorVersion: to.Ptr("1.29.0"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// Tags: map[string]*string{
// "name1": to.Ptr("val1"),
// },
// VirtualMachineNodesStatus: []*armcontainerservice.VirtualMachineNodes{
// {
// Count: to.Ptr[int32](1),
// Size: to.Ptr("Standard_D2_v2"),
// },
// },
// VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{
// Scale: &armcontainerservice.ScaleProfile{
// Autoscale: []*armcontainerservice.AutoScaleProfile{
// {
// MaxCount: to.Ptr[int32](5),
// MinCount: to.Ptr[int32](1),
// Size: to.Ptr("Standard_D2_v2"),
// },
// },
// },
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json
*/
async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
typePropertiesType: "VirtualMachines",
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "1.29.0",
osType: "Linux",
tags: { name1: "val1" },
virtualMachinesProfile: {
scale: { autoscale: [{ maxCount: 5, minCount: 1, size: "Standard_D2_v2" }] },
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"type": "VirtualMachines",
"currentOrchestratorVersion": "1.29.0",
"maxPods": 110,
"nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.29.0",
"osType": "Linux",
"provisioningState": "Succeeded",
"tags": {
"name1": "val1"
},
"virtualMachineNodesStatus": [
{
"count": 1,
"size": "Standard_D2_v2"
}
],
"virtualMachinesProfile": {
"scale": {
"autoscale": [
{
"maxCount": 5,
"minCount": 1,
"size": "Standard_D2_v2"
}
]
}
}
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"type": "VirtualMachines",
"currentOrchestratorVersion": "1.29.0",
"maxPods": 110,
"nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.29.0",
"osType": "Linux",
"provisioningState": "Creating",
"tags": {
"name1": "val1"
},
"virtualMachineNodesStatus": [
{
"count": 1,
"size": "Standard_D2_v2"
}
],
"virtualMachinesProfile": {
"scale": {
"autoscale": [
{
"maxCount": 5,
"minCount": 1,
"size": "Standard_D2_v2"
}
]
}
}
}
}
Create Agent Pool with Windows OSSKU
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2?api-version=2026-05-01
{
"properties": {
"count": 3,
"orchestratorVersion": "1.23.3",
"osSKU": "Windows2022",
"osType": "Windows",
"vmSize": "Standard_D4s_v3"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSSku;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsOSSKU.json
*/
/**
* Sample code: Create Agent Pool with Windows OSSKU.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createAgentPoolWithWindowsOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "wnp2",
new AgentPoolInner().withCount(3).withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS)
.withOsSku(OSSku.WINDOWS2022).withOrchestratorVersion("1.23.3"),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_windows_ossku.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="wnp2",
parameters={
"properties": {
"count": 3,
"orchestratorVersion": "1.23.3",
"osSKU": "Windows2022",
"osType": "Windows",
"vmSize": "Standard_D4s_v3",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsOSSKU.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_WindowsOSSKU.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "wnp2", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
OrchestratorVersion: to.Ptr("1.23.3"),
OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022),
OSType: to.Ptr(armcontainerservice.OSTypeWindows),
VMSize: to.Ptr("Standard_D4s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("wnp2"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.23.3"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.23.3"),
// OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022),
// OSType: to.Ptr(armcontainerservice.OSTypeWindows),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_D4s_v3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsOSSKU.json
*/
async function createAgentPoolWithWindowsOssku() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "wnp2", {
count: 3,
orchestratorVersion: "1.23.3",
osSKU: "Windows2022",
osType: "Windows",
vmSize: "Standard_D4s_v3",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "wnp2",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.23.3",
"maxPods": 110,
"orchestratorVersion": "1.23.3",
"osSKU": "Windows2022",
"osType": "Windows",
"provisioningState": "Succeeded",
"vmSize": "Standard_D4s_v3"
}
}
{
"name": "wnp2",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.23.3",
"maxPods": 110,
"orchestratorVersion": "1.23.3",
"osSKU": "Windows2022",
"osType": "Windows",
"provisioningState": "Creating",
"vmSize": "Standard_D4s_v3"
}
}
Create Spot Agent Pool
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy;
import com.azure.resourcemanager.containerservice.models.ScaleSetPriority;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Spot.json
*/
/**
* Sample code: Create Spot Agent Pool.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createSpotAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX)
.withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT)
.withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE).withTags(mapOf("name1", "val1"))
.withNodeLabels(mapOf("key1", "fakeTokenPlaceholder"))
.withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_spot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"nodeLabels": {"key1": "val1"},
"nodeTaints": ["Key1=Value1:NoSchedule"],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {"name1": "val1"},
"vmSize": "Standard_DS1_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_Spot.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_Spot.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
NodeLabels: map[string]*string{
"key1": to.Ptr("val1"),
},
NodeTaints: []*string{
to.Ptr("Key1=Value1:NoSchedule"),
},
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
Tags: map[string]*string{
"name1": to.Ptr("val1"),
},
VMSize: to.Ptr("Standard_DS1_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// MaxPods: to.Ptr[int32](110),
// NodeLabels: map[string]*string{
// "key1": to.Ptr("val1"),
// },
// NodeTaints: []*string{
// to.Ptr("Key1=Value1:NoSchedule"),
// },
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
// ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
// SpotMaxPrice: to.Ptr[float32](-1),
// Tags: map[string]*string{
// "name1": to.Ptr("val1"),
// },
// VMSize: to.Ptr("Standard_DS1_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Spot.json
*/
async function createSpotAgentPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "",
osType: "Linux",
scaleSetEvictionPolicy: "Delete",
scaleSetPriority: "Spot",
tags: { name1: "val1" },
vmSize: "Standard_DS1_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"spotMaxPrice": -1,
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Creating",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"spotMaxPrice": -1,
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
Create Windows Agent Pool with disabling OutboundNAT
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2?api-version=2026-05-01
{
"properties": {
"count": 3,
"orchestratorVersion": "1.23.8",
"osSKU": "Windows2022",
"osType": "Windows",
"vmSize": "Standard_D4s_v3",
"windowsProfile": {
"disableOutboundNat": true
}
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile;
import com.azure.resourcemanager.containerservice.models.OSSku;
import com.azure.resourcemanager.containerservice.models.OSType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json
*/
/**
* Sample code: Create Windows Agent Pool with disabling OutboundNAT.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void createWindowsAgentPoolWithDisablingOutboundNAT(
com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "wnp2",
new AgentPoolInner().withCount(3).withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS)
.withOsSku(OSSku.WINDOWS2022).withOrchestratorVersion("1.23.8")
.withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_windows_disable_outbound_nat.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="wnp2",
parameters={
"properties": {
"count": 3,
"orchestratorVersion": "1.23.8",
"osSKU": "Windows2022",
"osType": "Windows",
"vmSize": "Standard_D4s_v3",
"windowsProfile": {"disableOutboundNat": True},
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createWindowsAgentPoolWithDisablingOutboundNat() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "wnp2", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
OrchestratorVersion: to.Ptr("1.23.8"),
OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022),
OSType: to.Ptr(armcontainerservice.OSTypeWindows),
VMSize: to.Ptr("Standard_D4s_v3"),
WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{
DisableOutboundNat: to.Ptr(true),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("wnp2"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.23.8"),
// MaxPods: to.Ptr[int32](110),
// OrchestratorVersion: to.Ptr("1.23.8"),
// OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022),
// OSType: to.Ptr(armcontainerservice.OSTypeWindows),
// ProvisioningState: to.Ptr("Succeeded"),
// VMSize: to.Ptr("Standard_D4s_v3"),
// WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{
// DisableOutboundNat: to.Ptr(true),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json
*/
async function createWindowsAgentPoolWithDisablingOutboundNAT() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "wnp2", {
count: 3,
orchestratorVersion: "1.23.8",
osSKU: "Windows2022",
osType: "Windows",
vmSize: "Standard_D4s_v3",
windowsProfile: { disableOutboundNat: true },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "wnp2",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.23.8",
"maxPods": 110,
"orchestratorVersion": "1.23.8",
"osSKU": "Windows2022",
"osType": "Windows",
"provisioningState": "Succeeded",
"vmSize": "Standard_D4s_v3",
"windowsProfile": {
"disableOutboundNat": true
}
}
}
{
"name": "wnp2",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.23.8",
"maxPods": 110,
"orchestratorVersion": "1.23.8",
"osSKU": "Windows2022",
"osType": "Windows",
"provisioningState": "Creating",
"vmSize": "Standard_D4s_v3",
"windowsProfile": {
"disableOutboundNat": true
}
}
}
Create/Update Agent Pool
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"mode": "User",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.AgentPoolMode;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy;
import com.azure.resourcemanager.containerservice.models.ScaleSetPriority;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Update.json
*/
/**
* Sample code: Create/Update Agent Pool.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void
createUpdateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX)
.withMode(AgentPoolMode.USER).withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT)
.withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE).withTags(mapOf("name1", "val1"))
.withNodeLabels(mapOf("key1", "fakeTokenPlaceholder"))
.withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_create_update.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"mode": "User",
"nodeLabels": {"key1": "val1"},
"nodeTaints": ["Key1=Value1:NoSchedule"],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {"name1": "val1"},
"vmSize": "Standard_DS1_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPoolsCreate_Update.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPoolsCreate_Update.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
NodeLabels: map[string]*string{
"key1": to.Ptr("val1"),
},
NodeTaints: []*string{
to.Ptr("Key1=Value1:NoSchedule"),
},
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
Tags: map[string]*string{
"name1": to.Ptr("val1"),
},
VMSize: to.Ptr("Standard_DS1_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// MaxPods: to.Ptr[int32](110),
// Mode: to.Ptr(armcontainerservice.AgentPoolModeUser),
// NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"),
// NodeLabels: map[string]*string{
// "key1": to.Ptr("val1"),
// },
// NodeTaints: []*string{
// to.Ptr("Key1=Value1:NoSchedule"),
// },
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
// ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
// Tags: map[string]*string{
// "name1": to.Ptr("val1"),
// },
// VMSize: to.Ptr("Standard_DS1_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPoolsCreate_Update.json
*/
async function createOrUpdateAgentPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
mode: "User",
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "",
osType: "Linux",
scaleSetEvictionPolicy: "Delete",
scaleSetPriority: "Spot",
tags: { name1: "val1" },
vmSize: "Standard_DS1_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"mode": "User",
"nodeImageVersion": "AKSUbuntu:1604:2020.03.11",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"maxPods": 110,
"mode": "User",
"nodeLabels": {
"key1": "val1"
},
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Creating",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"tags": {
"name1": "val1"
},
"vmSize": "Standard_DS1_v2"
}
}
Start Agent Pool
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"powerState": {
"code": "Running"
}
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.Code;
import com.azure.resourcemanager.containerservice.models.PowerState;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPools_Start.json
*/
/**
* Sample code: Start Agent Pool.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void startAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withPowerState(new PowerState().withCode(Code.RUNNING)), null, null,
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_start.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={"properties": {"powerState": {"code": "Running"}}},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPools_Start.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPools_Start.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
PowerState: &armcontainerservice.PowerState{
Code: to.Ptr(armcontainerservice.CodeRunning),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](50),
// EnableAutoScaling: to.Ptr(true),
// MaxCount: to.Ptr[int32](55),
// MinCount: to.Ptr[int32](3),
// PowerState: &armcontainerservice.PowerState{
// Code: to.Ptr(armcontainerservice.CodeRunning),
// },
// ProvisioningState: to.Ptr("Starting"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPools_Start.json
*/
async function startAgentPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
powerState: { code: "Running" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 50,
"enableAutoScaling": true,
"maxCount": 55,
"minCount": 3,
"powerState": {
"code": "Running"
},
"provisioningState": "Starting"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 50,
"enableAutoScaling": true,
"maxCount": 55,
"minCount": 3,
"powerState": {
"code": "Running"
},
"provisioningState": "Starting"
}
}
Stop Agent Pool
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"powerState": {
"code": "Stopped"
}
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.Code;
import com.azure.resourcemanager.containerservice.models.PowerState;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPools_Stop.json
*/
/**
* Sample code: Stop Agent Pool.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void stopAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withPowerState(new PowerState().withCode(Code.STOPPED)), null, null,
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_stop.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={"properties": {"powerState": {"code": "Stopped"}}},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPools_Stop.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPools_Stop.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
PowerState: &armcontainerservice.PowerState{
Code: to.Ptr(armcontainerservice.CodeStopped),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](0),
// EnableAutoScaling: to.Ptr(false),
// PowerState: &armcontainerservice.PowerState{
// Code: to.Ptr(armcontainerservice.CodeStopped),
// },
// ProvisioningState: to.Ptr("Stopping"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPools_Stop.json
*/
async function stopAgentPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
powerState: { code: "Stopped" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 0,
"enableAutoScaling": false,
"powerState": {
"code": "Stopped"
},
"provisioningState": "Stopping"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 0,
"enableAutoScaling": false,
"powerState": {
"code": "Stopped"
},
"provisioningState": "Stopping"
}
}
Update Agent Pool
Örnek isteği
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1?api-version=2026-05-01
{
"properties": {
"count": 3,
"enableAutoScaling": true,
"maxCount": 2,
"minCount": 2,
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"vmSize": "Standard_DS1_v2"
}
}
import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner;
import com.azure.resourcemanager.containerservice.models.OSType;
import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy;
import com.azure.resourcemanager.containerservice.models.ScaleSetPriority;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for AgentPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-05-01/AgentPools_Update.json
*/
/**
* Sample code: Update Agent Pool.
*
* @param manager Entry point to ContainerServiceManager.
*/
public static void updateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) {
manager.serviceClient().getAgentPools().createOrUpdate("rg1", "clustername1", "agentpool1",
new AgentPoolInner().withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX).withMaxCount(2)
.withMinCount(2).withEnableAutoScaling(true).withOrchestratorVersion("")
.withScaleSetPriority(ScaleSetPriority.SPOT).withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE)
.withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")),
null, null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python agent_pools_update.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.agent_pools.begin_create_or_update(
resource_group_name="rg1",
resource_name="clustername1",
agent_pool_name="agentpool1",
parameters={
"properties": {
"count": 3,
"enableAutoScaling": True,
"maxCount": 2,
"minCount": 2,
"nodeTaints": ["Key1=Value1:NoSchedule"],
"orchestratorVersion": "",
"osType": "Linux",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"vmSize": "Standard_DS1_v2",
}
},
).result()
print(response)
# x-ms-original-file: 2026-05-01/AgentPools_Update.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v9"
)
// Generated from example definition: 2026-05-01/AgentPools_Update.json
func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{
Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
Count: to.Ptr[int32](3),
EnableAutoScaling: to.Ptr(true),
MaxCount: to.Ptr[int32](2),
MinCount: to.Ptr[int32](2),
NodeTaints: []*string{
to.Ptr("Key1=Value1:NoSchedule"),
},
OrchestratorVersion: to.Ptr(""),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
VMSize: to.Ptr("Standard_DS1_v2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservice.AgentPoolsClientCreateOrUpdateResponse{
// AgentPool: armcontainerservice.AgentPool{
// Name: to.Ptr("agentpool1"),
// Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"),
// Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{
// Count: to.Ptr[int32](3),
// CurrentOrchestratorVersion: to.Ptr("1.9.6"),
// EnableAutoScaling: to.Ptr(true),
// MaxCount: to.Ptr[int32](2),
// MaxPods: to.Ptr[int32](110),
// MinCount: to.Ptr[int32](2),
// NodeTaints: []*string{
// to.Ptr("Key1=Value1:NoSchedule"),
// },
// OrchestratorVersion: to.Ptr("1.9.6"),
// OSType: to.Ptr(armcontainerservice.OSTypeLinux),
// ProvisioningState: to.Ptr("Succeeded"),
// ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete),
// ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot),
// VMSize: to.Ptr("Standard_DS1_v2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates an agent pool in the specified managed cluster.
*
* @summary creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: 2026-05-01/AgentPools_Update.json
*/
async function updateAgentPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.createOrUpdate("rg1", "clustername1", "agentpool1", {
count: 3,
enableAutoScaling: true,
maxCount: 2,
minCount: 2,
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "",
osType: "Linux",
scaleSetEvictionPolicy: "Delete",
scaleSetPriority: "Spot",
vmSize: "Standard_DS1_v2",
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"enableAutoScaling": true,
"maxCount": 2,
"maxPods": 110,
"minCount": 2,
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Succeeded",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"vmSize": "Standard_DS1_v2"
}
}
{
"name": "agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"properties": {
"count": 3,
"currentOrchestratorVersion": "1.9.6",
"enableAutoScaling": true,
"maxCount": 2,
"maxPods": 110,
"minCount": 2,
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"orchestratorVersion": "1.9.6",
"osType": "Linux",
"provisioningState": "Updating",
"scaleSetEvictionPolicy": "Delete",
"scaleSetPriority": "Spot",
"vmSize": "Standard_DS1_v2"
}
}
Tanımlar
| Name |
Description |
|
AgentPool
|
Aracı Havuzu.
|
|
AgentPoolArtifactStreamingProfile
|
Ajan havuzu için artefakt akış profili.
|
|
AgentPoolGatewayProfile
|
Yönetilen küme ağ geçidi aracı havuzunun profili.
|
|
AgentPoolMode
|
Aracı havuzunun modu. Bir kümenin her zaman en az bir 'Sistem' Aracı Havuzu olmalıdır. Aracı havuzu kısıtlamaları ve en iyi yöntemler hakkında ek bilgi için bkz. https://docs.microsoft.com/azure/aks/use-system-pools
|
|
AgentPoolNetworkProfile
|
Aracı havuzunun ağ ayarları.
|
|
AgentPoolSecurityProfile
|
Aracı havuzunun güvenlik ayarları.
|
|
AgentPoolSSHAccess
|
Aracı havuzunun SSH erişim yöntemi.
|
|
AgentPoolStatus
|
Aracı Havuzu hakkında salt okunur bilgiler içerir.
|
|
AgentPoolType
|
Aracı Havuzu türü.
|
|
AgentPoolUpgradeSettings
|
Aracı havuzunu yükseltme ayarları
|
|
AgentPoolWindowsProfile
|
Windows aracı havuzunun belirli profili.
|
|
AutoScaleProfile
|
Otomatik ölçeklendirmeyle ilgili belirtimler.
|
|
Code
|
Kümenin Çalışıyor mu yoksa Durduruldu mu olduğunu bildirir
|
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
CreationData
|
Kaynak kaynaktan hedef kaynak oluştururken kullanılan veriler.
|
|
ErrorAdditionalInfo
|
Kaynak yönetimi hatasına ilişkin ek bilgiler.
|
|
ErrorDetail
|
Hata ayrıntısı.
|
|
ErrorResponse
|
Hata yanıtı
|
|
GPUDriver
|
GPU sürücülerinin yüklenip yüklenmeyeceği. Belirtilmediğinde, varsayılan olarak Yükle'dir.
|
|
GPUInstanceProfile
|
Desteklenen GPU VM SKU'su için GPU MIG örnek profilini belirtmek üzere kullanılacak GPUInstanceProfile.
|
|
GPUProfile
|
Aracı Havuzu için GPU ayarları.
|
|
IPTag
|
Nesneyle ilişkilendirilmiş IPTag'i içerir.
|
|
KubeletConfig
|
Aracı düğümlerinin Kubelet yapılandırmaları. Daha fazla bilgi için bkz. AKS özel düğüm yapılandırma .
|
|
KubeletDiskType
|
emptyDir birimlerinin, kapsayıcı çalışma zamanı veri kökünün ve Kubelet kısa ömürlü depolamanın yerleşimini belirler.
|
|
LinuxOSConfig
|
Linux aracı düğümlerinin işletim sistemi yapılandırmaları. Daha fazla bilgi için bkz. AKS özel düğüm yapılandırma .
|
|
LocalDNSForwardDestination
|
LocalDNS'den iletilecek DNS sorguları için hedef sunucu.
|
|
LocalDNSForwardPolicy
|
Yukarı akış DNS sunucusunu seçmek için ilkeyi iletin. Daha fazla bilgi için ileri eklentiye bakın.
|
|
LocalDNSMode
|
localDNS için etkinleştirme modu.
|
|
LocalDNSOverride
|
localDNS profili için geçersiz kılmalar.
|
|
LocalDNSProfile
|
VnetDNS ve KubeDNS geçersiz kılmaları ile düğüm başına yerel DNS'yi yapılandırır. LocalDNS, bir AKS kümesinde DNS çözümlemesinin performansını ve güvenilirliğini artırmaya yardımcı olur. Daha fazla ayrıntı için aka.ms/aks/localdns bakın.
|
|
LocalDNSProtocol
|
LocalDNS'den yukarı akış DNS sunucusuna bağlantılar için TCP'yi zorunlu kılın veya UDP protokolünü tercih edin.
|
|
LocalDNSQueryLogging
|
localDNS'deki DNS sorguları için günlük düzeyi.
|
|
LocalDNSServeStale
|
Eski verileri sunma ilkesi. Daha fazla bilgi için önbellek eklentisine bakın.
|
|
LocalDNSState
|
localDNS'nin sistem tarafından oluşturulan durumu.
|
|
ManualScaleProfile
|
Makine sayısıyla ilgili belirtimler.
|
|
OSDiskType
|
Aracı havuzundaki makineler için kullanılacak işletim sistemi disk türü. VM destekliyorsa ve istenen OSDiskSizeGB değerinden daha büyük bir önbellek diske sahipse varsayılan değer 'Kısa Ömürlü'dür. Aksi takdirde, varsayılan olarak 'Yönetilen' olarak gösterilir. Oluşturulduktan sonra değiştirilemez. Daha fazla bilgi için bkz. kısa ömürlü işletim sistemi .
|
|
OSSKU
|
Aracı havuzu tarafından kullanılan işletim sistemi SKU'su belirtir. OSType Linux ise varsayılan değer Ubuntu'dur. OSType Windows ise, Kubernetes <= 1,24 veya Windows2022 olduğunda varsayılan >değer Windows2019'dur.
|
|
OSType
|
İşletim sistemi türü. Varsayılan değer Linux'tır.
|
|
PodIPAllocationMode
|
Pod IP Ayırma Modu. Aracı havuzundaki podlar için IP ayırma modu. podSubnetId ile kullanılmalıdır. Varsayılan değer :'DynamicIndividual'.
|
|
PortRange
|
Bağlantı noktası aralığı.
|
|
PowerState
|
Kümenin Güç Durumunu açıklar
|
|
Protocol
|
Bağlantı noktasının ağ protokolü.
|
|
ScaleDownMode
|
VM'lerin Aracı Havuzlarına nasıl eklendiğini veya bu havuzlardan nasıl kaldırıldığını açıklar.
Faturalandırma durumlarına bakın.
|
|
ScaleProfile
|
VirtualMachines aracı havuzunu ölçeklendirmeye ilişkin belirtimler.
|
|
ScaleSetEvictionPolicy
|
Sanal Makine Ölçek Kümesi çıkarma ilkesi. Çıkarma ilkesi, çıkarıldığında VM ile ne yapılacağını belirtir. Varsayılan değer Sil'dir. Çıkarma hakkında daha fazla bilgi için bkz.
|
|
ScaleSetPriority
|
Sanal Makine Ölçek Kümesi önceliği.
|
|
SysctlConfig
|
Linux aracı düğümleri için sysctl ayarları.
|
|
systemData
|
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
|
|
UndrainableNodeBehavior
|
Yükseltme sırasında çizilemez düğümlerin davranışını tanımlar. Çizilemeyen düğümlerin en yaygın nedeni Pod Kesinti bütçeleri (PDB) olsa da pod sonlandırma yetkisiz kullanım süresi kalan düğüm başına boşaltma zaman aşımını aşıyor veya pod hala çalışıyor durumdaysa, ayrıca çizilemez düğümlere neden olabilir.
|
|
VirtualMachineNodes
|
Aynı vm boyutundaki düğüm grubundaki geçerli durum.
|
|
VirtualMachinesProfile
|
VirtualMachines aracı havuzundaki belirtimler.
|
|
WorkloadRuntime
|
Bir düğümün çalıştırabileceği iş yükü türünü belirler.
|
AgentPool
Nesne
Aracı Havuzu.
| Name |
Tür |
Default value |
Description |
|
id
|
string
(arm-id)
|
|
Kaynağın tam nitelikli kaynak kimliği. Örneğin "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
|
Kaynağın adı
|
|
properties.artifactStreamingProfile
|
AgentPoolArtifactStreamingProfile
|
|
AKS'de yapıt akışını kullanmak için yapılandırma.
|
|
properties.availabilityZones
|
string[]
|
|
Düğümler için kullanılacak Kullanılabilirlik alanlarının listesi. Bu yalnızca AgentPoolType özelliği 'VirtualMachineScaleSets' olduğunda belirtilebilir.
|
|
properties.capacityReservationGroupID
|
string
(arm-id)
|
|
Kapasite Rezervasyon Grubu'nun tam nitelikli kaynak kimliği, ayrılmış bir Sanal Makine grubundan sanal makineler sağlamak için. Bu şu şekildedir: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Müşteriler belirli bir CRG ile bir ajan havuzu oluşturmak için bunu kullanır. Daha fazla bilgi için Kapasite Rezervasyonu'na bakınız
|
|
properties.count
|
integer
(int32)
|
|
Docker kapsayıcılarını barındıracak aracıların (VM) sayısı. İzin verilen değerler, kullanıcı havuzları için 0 ile 1000 (dahil) arasında ve sistem havuzları için 1 ile 1000 (dahil) arasında olmalıdır. Varsayılan değer 1'dir.
|
|
properties.creationData
|
CreationData
|
|
Düğüm havuzu bir anlık görüntü kullanılarak oluşturulacak/yükseltilecekse kaynak Anlık Görüntü Kimliğini belirtmek için kullanılacak CreationData.
|
|
properties.currentOrchestratorVersion
|
string
|
|
Aracı Havuzunun çalıştığı Kubernetes sürümü. OrchestratorVersion tam olarak belirtilen bir sürüm <major.minor.patch>ise, bu alan buna tam olarak eşit olacaktır. OrchestratorVersion <major.minor>ise, bu alan kullanılmakta olan tam <major.minor.patch> sürümünü içerir.
|
|
properties.eTag
|
string
|
|
İyimser eşzamanlılık uygulamak için kullanılan benzersiz salt okunur dize. Kaynak güncelleştirildiğinde eTag değeri değişir. Normal eTag kuralına göre iyimser eşzamanlılığı etkinleştirmek için sonraki bir istek için eTag değeriyle bir if-match veya if-none-match üst bilgisi belirtin.
|
|
properties.enableAutoScaling
|
boolean
|
|
Otomatik ölçeklendiricinin etkinleştirilip etkinleştirilmeyileceği
|
|
properties.enableEncryptionAtHost
|
boolean
|
|
Konak tabanlı işletim sisteminin ve veri sürücüsü şifrelemenin etkinleştirilip etkinleştirilmeyileceği. Bu yalnızca belirli VM boyutlarında ve belirli Azure bölgelerinde desteklenir. Daha fazla bilgi için, şuraya bakın: https://docs.microsoft.com/azure/aks/enable-host-encryption
|
|
properties.enableFIPS
|
boolean
|
|
FIPS özellikli işletim sisteminin kullanılıp kullanılmaymayacağı. Daha fazla ayrıntı için bkz. FIPS özellikli düğüm havuzu ekleme .
|
|
properties.enableNodePublicIP
|
boolean
|
|
Her düğümün kendi genel IP'sini ayırıp ayırmadığı. Bazı senaryolar, düğüm havuzundaki düğümlerin kendi ayrılmış genel IP adreslerini almasını gerektirebilir. Yaygın bir senaryo, konsolun atlamaları en aza indirmek için bulut sanal makinesine doğrudan bağlantı sağlaması gereken oyun iş yüklerine yöneliktir. Daha fazla bilgi için bkz. Düğüm başına genel IP atama. Varsayılan değer false'tur.
|
|
properties.enableUltraSSD
|
boolean
|
|
UltraSSD'nin etkinleştirilip etkinleştirilmeyileceği
|
|
properties.gatewayProfile
|
AgentPoolGatewayProfile
|
|
Ağ geçidi modunda yönetilen aracı havuzuna özgü profil. Aracı havuzu modu Ağ Geçidi değilse bu alan ayarlanamaz.
|
|
properties.gpuInstanceProfile
|
GPUInstanceProfile
|
|
Desteklenen GPU VM SKU'su için GPU MIG örnek profilini belirtmek üzere kullanılacak GPUInstanceProfile.
|
|
properties.gpuProfile
|
GPUProfile
|
|
Aracı Havuzu için GPU ayarları.
|
|
properties.hostGroupID
|
string
(arm-id)
|
|
Sanal makinelerin sağlanacağı Ayrılmış Konak Grubunun tam kaynak kimliği, yalnızca oluşturma senaryosunda kullanılır ve bir kez ayarlandıktan sonra değiştirilmesine izin verilmez. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. Daha fazla bilgi için bkz. Azure ayrılmış konakları.
|
|
properties.kubeletConfig
|
KubeletConfig
|
|
Aracı havuzu düğümlerinde Kubelet yapılandırması.
|
|
properties.kubeletDiskType
|
KubeletDiskType
|
|
emptyDir birimlerinin, kapsayıcı çalışma zamanı veri kökünün ve Kubelet kısa ömürlü depolamanın yerleşimini belirler.
|
|
properties.linuxOSConfig
|
LinuxOSConfig
|
|
Linux aracı düğümlerinin işletim sistemi yapılandırması.
|
|
properties.localDNSProfile
|
LocalDNSProfile
|
|
VnetDNS ve KubeDNS geçersiz kılmaları ile düğüm başına yerel DNS'yi yapılandırır. LocalDNS, bir AKS kümesinde DNS çözümlemesinin performansını ve güvenilirliğini artırmaya yardımcı olur. Daha fazla ayrıntı için aka.ms/aks/localdns bakın.
|
|
properties.maxCount
|
integer
(int32)
|
|
Otomatik ölçeklendirme için en fazla düğüm sayısı
|
|
properties.maxPods
|
integer
(int32)
|
|
Bir düğümde çalışabilecek en fazla pod sayısı.
|
|
properties.messageOfTheDay
|
string
|
|
Base64 kodlu Linux düğümleri için günün iletisi. Kod çözmeden sonra /etc/motd öğesine yazılacak base64 kodlanmış bir dize. Bu, Linux düğümleri için günün iletisinin özelleştirilmesini sağlar. Windows düğümleri için belirtilmemelidir. Statik bir dize olmalıdır (örneğin, ham olarak yazdırılır ve betik olarak yürütülmeyecektir).
|
|
properties.minCount
|
integer
(int32)
|
|
Otomatik ölçeklendirme için en az düğüm sayısı
|
|
properties.mode
|
AgentPoolMode
|
|
Aracı havuzunun modu. Bir kümenin her zaman en az bir 'Sistem' Aracı Havuzu olmalıdır. Aracı havuzu kısıtlamaları ve en iyi yöntemler hakkında ek bilgi için bkz. https://docs.microsoft.com/azure/aks/use-system-pools
|
|
properties.networkProfile
|
AgentPoolNetworkProfile
|
|
Aracı havuzunun ağ ile ilgili ayarları.
|
|
properties.nodeImageVersion
|
string
|
|
Düğüm görüntüsünün versiyonu. Bu değeri ayarlamak, agentPool geri dönüşünü tetikler.
Sadece değerler için izin recentlyUsedVersions verilir.
|
|
properties.nodeLabels
|
object
|
|
Aracı havuzundaki tüm düğümlerde kalıcı hale getirmek için düğüm etiketleri.
|
|
properties.nodePublicIPPrefixID
|
string
(arm-id)
|
|
VM düğümlerinin IP'lerini kullanması gereken genel IP ön ek kimliği. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
|
|
properties.nodeTaints
|
string[]
|
|
Düğüm havuzu oluşturma ve ölçeklendirme sırasında yeni düğümlere eklenen renk tonları. Örneğin, key=value:NoSchedule.
|
|
properties.orchestratorVersion
|
string
|
|
Kullanıcı tarafından belirtilen Kubernetes sürümü. Hem yama sürümü <major.minor.patch> (örneğin, 1.20.13) hem de <major.minor> (örneğin 1.20) desteklenir.
<major.minor> belirtildiğinde, desteklenen en son GA düzeltme eki sürümü otomatik olarak seçilir. Küme oluşturulduktan sonra aynı <major.minor> ile güncelleştirilmesi (örneğin, 1.14.x -> 1.14) daha yeni bir düzeltme eki sürümü kullanılabilir olsa bile yükseltme tetiklemez. En iyi yöntem olarak, AKS kümesindeki tüm düğüm havuzlarını aynı Kubernetes sürümüne yükseltmeniz gerekir. Düğüm havuzu sürümü, denetim düzlemi ile aynı ana sürüme sahip olmalıdır. Düğüm havuzu ikincil sürümü, denetim düzlemi sürümünün iki ikincil sürümünde olmalıdır. Düğüm havuzu sürümü, denetim düzlemi sürümünden büyük olamaz. Daha fazla bilgi için bkz. Düğüm havuzunu yükseltme.
|
|
properties.osDiskSizeGB
|
integer
(int32)
minimum: 0 maximum: 2048
|
|
Ana/aracı havuzundaki her makine için disk boyutunu belirtmek için kullanılacak GB cinsinden işletim sistemi Disk Boyutu. 0 belirtirseniz, belirtilen vmSize değerine göre varsayılan osDisk boyutunu uygular.
|
|
properties.osDiskType
|
OSDiskType
|
|
Aracı havuzundaki makineler için kullanılacak işletim sistemi disk türü. VM destekliyorsa ve istenen OSDiskSizeGB değerinden daha büyük bir önbellek diske sahipse varsayılan değer 'Kısa Ömürlü'dür. Aksi takdirde, varsayılan olarak 'Yönetilen' olarak gösterilir. Oluşturulduktan sonra değiştirilemez. Daha fazla bilgi için bkz. kısa ömürlü işletim sistemi .
|
|
properties.osSKU
|
OSSKU
|
|
Aracı havuzu tarafından kullanılan işletim sistemi SKU'su belirtir. OSType Linux ise varsayılan değer Ubuntu'dur. OSType Windows ise, Kubernetes <= 1,24 veya Windows2022 olduğunda varsayılan >değer Windows2019'dur.
|
|
properties.osType
|
OSType
|
Linux
|
İşletim sistemi türü. Varsayılan değer Linux'tır.
|
|
properties.podIPAllocationMode
|
PodIPAllocationMode
|
|
Pod IP Ayırma Modu. Aracı havuzundaki podlar için IP ayırma modu. podSubnetId ile kullanılmalıdır. Varsayılan değer :'DynamicIndividual'.
|
|
properties.podSubnetID
|
string
(arm-id)
|
|
Podların başlatıldığında birleştirileceği alt ağın kimliği. Atlanırsa pod IP'leri düğüm alt ağından statik olarak atanır (daha fazla ayrıntı için bkz. vnetSubnetID). Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
|
|
properties.powerState
|
PowerState
|
|
Aracı Havuzunun çalışıp çalışmadığı veya durdurulduğu. Bir Aracı Havuzu ilk oluşturulduğunda başlangıçta Çalışıyor olur. Aracı Havuzu, bu alan Durduruldu olarak ayarlanarak durdurulabilir. Durdurulan Aracı Havuzu tüm VM'lerini durdurur ve faturalama ücretlerini tahakkuk etmez. Aracı Havuzu yalnızca Çalışıyor ve sağlama durumu Başarılı olduğunda durdurulabilir
|
|
properties.provisioningState
|
string
|
|
Geçerli dağıtım veya sağlama durumu.
|
|
properties.proximityPlacementGroupID
|
string
(arm-id)
|
|
YakınLık Yerleştirme Grubu kimliği.
|
|
properties.scaleDownMode
|
ScaleDownMode
|
|
Aracı Havuzunu ölçeklendirirken kullanılacak ölçeği azaltma modu. Bu, küme otomatik ölçeklendirici davranışını da etkiler. Belirtilmezse, varsayılan olarak Delete olur.
|
|
properties.scaleSetEvictionPolicy
|
ScaleSetEvictionPolicy
|
Delete
|
Sanal Makine Ölçek Kümesi çıkarma ilkesi. Çıkarma ilkesi, çıkarıldığında VM ile ne yapılacağını belirtir. Varsayılan değer Sil'dir. Çıkarma hakkında daha fazla bilgi için bkz.
|
|
properties.scaleSetPriority
|
ScaleSetPriority
|
Regular
|
Sanal Makine Ölçek Kümesi önceliği.
|
|
properties.securityProfile
|
AgentPoolSecurityProfile
|
|
Aracı havuzunun güvenlik ayarları.
|
|
properties.spotMaxPrice
|
number
(float)
|
-1
|
Spot örnekler için ödeme yapmak istediğiniz maksimum fiyat (ABD Doları cinsinden). Olası değerler, varsayılan fiyatın isteğe bağlı olarak up-to belirten sıfırdan büyük veya -1 herhangi bir ondalık değerdir. Olası değerler, herhangi bir isteğe bağlı fiyat ödemeye istekli olduğunu gösteren sıfırdan veya -1 büyük herhangi bir ondalık değerdir. Spot fiyatlandırma hakkında daha fazla bilgi için bkz. spot VM fiyatlandırması
|
|
properties.status
|
AgentPoolStatus
|
|
Aracı Havuzu hakkında salt okunur bilgiler içerir.
|
|
properties.tags
|
object
|
|
Aracı havuzu sanal makine ölçek kümesinde kalıcı hale eklenecek etiketler.
|
|
properties.type
|
AgentPoolType
|
|
Aracı Havuzu türü.
|
|
properties.upgradeSettings
|
AgentPoolUpgradeSettings
|
|
Aracı havuzunu yükseltme ayarları
|
|
properties.virtualMachineNodesStatus
|
VirtualMachineNodes[]
|
|
VirtualMachines aracı havuzundaki düğümlerin durumu.
|
|
properties.virtualMachinesProfile
|
VirtualMachinesProfile
|
|
VirtualMachines aracı havuzundaki belirtimler.
|
|
properties.vmSize
|
string
|
|
Aracı havuzu VM'lerinin boyutu. VM boyutu kullanılabilirliği bölgeye göre değişir. Düğüm yetersiz işlem kaynakları (bellek, cpu vb.) içeriyorsa podlar düzgün çalışmayabilir. Kısıtlanmış VM boyutları hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/azure/aks/quotas-skus-regions
|
|
properties.vnetSubnetID
|
string
(arm-id)
|
|
Aracı havuzu düğümlerinin ve isteğe bağlı olarak podların başlangıçta birleştirileceği alt ağın kimliği. Bu belirtilmezse, bir sanal ağ ve alt ağ oluşturulur ve kullanılır. PodSubnetID belirtilmezse, bu düğümler ve podlar için geçerlidir, aksi takdirde yalnızca düğümler için geçerlidir. Bu şu biçimdedir: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
|
|
properties.windowsProfile
|
AgentPoolWindowsProfile
|
|
Windows aracı havuzunun belirli profili.
|
|
properties.workloadRuntime
|
WorkloadRuntime
|
|
Bir düğümün çalıştırabileceği iş yükü türünü belirler.
|
|
systemData
|
systemData
|
|
createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.
|
|
type
|
string
|
|
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"
|
AgentPoolArtifactStreamingProfile
Nesne
Ajan havuzu için artefakt akış profili.
| Name |
Tür |
Description |
|
enabled
|
boolean
|
Yapıt akışı, isteğe bağlı görüntü yükleme aracılığıyla bir düğümdeki kapsayıcıların başlatma işlemini hızlandırır. Bu özelliği kullanmak için kapsayıcı görüntülerinin ACR üzerinde yapıt akışını da etkinleştirmesi gerekir. Belirtilmezse varsayılan değer false olur.
|
AgentPoolGatewayProfile
Nesne
Yönetilen küme ağ geçidi aracı havuzunun profili.
| Name |
Tür |
Default value |
Description |
|
publicIPPrefixSize
|
integer
(int32)
minimum: 28 maximum: 31
|
31
|
Ağ geçidi aracı havuzu, genel çıkış sağlamak için her statik çıkış ağ geçidi için bir genel IPPrefix ilişkilendirir. Genel IPPrefix'in boyutu kullanıcı tarafından seçilmelidir. Aracı havuzundaki her düğüm, IPPrefix'ten bir IP ile atanır. BU nedenle IPPrefix boyutu, Ağ Geçidi aracı havuzunun boyutu üzerinde bir üst sınır görevi görür. Azure genel IPPrefix boyut sınırlaması nedeniyle geçerli değer aralığı [28, 31] (/31 = 2 düğüm/IP, /30 = 4 düğüm/IP, /29 = 8 düğüm/IP, /28 = 16 düğüm/IP). Varsayılan değer 31'dir.
|
AgentPoolMode
Numaralandırma
Aracı havuzunun modu. Bir kümenin her zaman en az bir 'Sistem' Aracı Havuzu olmalıdır. Aracı havuzu kısıtlamaları ve en iyi yöntemler hakkında ek bilgi için bkz. https://docs.microsoft.com/azure/aks/use-system-pools
| Değer |
Description |
|
System
|
Sistem aracısı havuzları öncelikle CoreDNS ve metrics-server gibi kritik sistem podlarını barındırmaya yöneliktir. Sistem aracısı havuzları osType Linux olmalıdır. Sistem aracısı havuzları VM SKU'su en az 2vCPU ve 4 GB belleğe sahip olmalıdır.
|
|
User
|
Kullanıcı aracısı havuzları öncelikli olarak uygulama podlarınızı barındırmaya yöneliktir.
|
|
Gateway
|
Ağ geçidi aracı havuzları, podlara statik çıkış IP'leri sağlamaya ayrılmıştır. Diğer ayrıntılar için bkz. https://aka.ms/aks/static-egress-gateway.
|
AgentPoolNetworkProfile
Nesne
Aracı havuzunun ağ ayarları.
| Name |
Tür |
Description |
|
allowedHostPorts
|
PortRange[]
|
Erişmesine izin verilen bağlantı noktası aralıkları. Belirtilen aralıkların çakışmasına izin verilir.
|
|
applicationSecurityGroups
|
string[]
(arm-id)
|
Aracı havuzunun oluşturulduğunda ilişkilendirileceği uygulama güvenlik gruplarının kimlikleri.
|
|
nodePublicIPTags
|
IPTag[]
|
Örnek düzeyinde genel IP'lerin IPTag'leri.
|
AgentPoolSecurityProfile
Nesne
Aracı havuzunun güvenlik ayarları.
| Name |
Tür |
Description |
|
enableSecureBoot
|
boolean
|
Güvenli Önyükleme, yalnızca imzalı işletim sistemlerinin ve sürücülerin önyüklenmesini sağlayan Güvenilir Başlatma özelliğidir. Diğer ayrıntılar için bkz. aka.ms/aks/trustedlaunch. Belirtilmezse varsayılan değer false olur.
|
|
enableVTPM
|
boolean
|
vTPM, düğümde yerel olarak tutulan anahtarlar ve ölçümler için ayrılmış bir güvenli kasa yapılandırmaya yönelik bir Güvenilen Başlatma özelliğidir. Diğer ayrıntılar için bkz. aka.ms/aks/trustedlaunch. Belirtilmezse varsayılan değer false olur.
|
|
sshAccess
|
AgentPoolSSHAccess
|
Aracı havuzunun SSH erişim yöntemi.
|
AgentPoolSSHAccess
Numaralandırma
Aracı havuzunun SSH erişim yöntemi.
| Değer |
Description |
|
LocalUser
|
Özel anahtar kullanarak yerel bir kullanıcı olarak düğüme SSH yapabilir.
|
|
Disabled
|
Düğümde SSH hizmeti kapatılacaktır.
|
AgentPoolStatus
Nesne
Aracı Havuzu hakkında salt okunur bilgiler içerir.
| Name |
Tür |
Description |
|
provisioningError
|
ErrorDetail
|
Aracı havuzunun hata ayrıntı bilgileri. Hatanın ayrıntılı bilgilerini korur. Hata yoksa, bu alan atlanır.
|
AgentPoolType
Numaralandırma
Aracı Havuzu türü.
| Değer |
Description |
|
VirtualMachineScaleSets
|
Sanal Makine Ölçek Kümesi tarafından yedeklenen bir Aracı Havuzu oluşturun.
|
|
AvailabilitySet
|
Bunun kullanımı kesinlikle önerilmez.
|
|
VirtualMachines
|
Tek Örnekli VM düzenleme modu tarafından yedeklenen bir Aracı Havuzu oluşturun.
|
AgentPoolUpgradeSettings
Nesne
Aracı havuzunu yükseltme ayarları
| Name |
Tür |
Description |
|
drainTimeoutInMinutes
|
integer
(int32)
minimum: 1 maximum: 1440
|
Bir düğüm için boşaltma zaman aşımı. Podların çıkarılması ve düğüm başına düzgün sonlandırma için bekleme süresi (dakika cinsinden). Bu çıkarma bekleme süresi, pod kesintisi bütçelerini beklemeyi kabul eder. Bu süre aşılırsa yükseltme başarısız olur. Belirtilmezse, varsayılan değer 30 dakikadır.
|
|
maxSurge
|
string
|
Yükseltme sırasında kullanılabilecek en fazla düğüm sayısı veya yüzdesi. Bu bir tamsayıya (ör. '5') veya yüzdeye (örneğin, '50%') ayarlanabilir. Yüzde belirtilirse, yükseltme sırasındaki toplam aracı havuzu boyutunun yüzdesidir. Yüzdeler için kesirli düğümler yukarı yuvarlanir. Belirtilmezse, varsayılan değer 10%'dir. En iyi yöntemler de dahil olmak üzere daha fazla bilgi için bkz. https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster
|
|
maxUnavailable
|
string
|
Yükseltme sırasında aynı anda kullanılamayabilecek en fazla düğüm sayısı veya yüzdesi. Bu bir tamsayıya (ör. '1') veya bir yüzdeye (ör. '5%') ayarlanabilir. Yüzde belirtilirse, yükseltme sırasındaki toplam aracı havuzu boyutunun yüzdesidir. Yüzdeler için kesirli düğümler yukarı yuvarlanir. Belirtilmezse, varsayılan değer 0'dır. En iyi yöntemler de dahil olmak üzere daha fazla bilgi için bkz. https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster
|
|
nodeSoakDurationInMinutes
|
integer
(int32)
minimum: 0 maximum: 30
|
Bir düğümün ıslatma süresi. Bir düğümü boşaltıp yeniden boyutlandırmadan ve sonraki düğüme geçmeden önce beklenmesi gereken süre (dakika cinsinden). Belirtilmezse, varsayılan değer 0 dakikadır.
|
|
undrainableNodeBehavior
|
UndrainableNodeBehavior
|
Yükseltme sırasında çizilemez düğümlerin davranışını tanımlar. Çizilemeyen düğümlerin en yaygın nedeni Pod Kesinti bütçeleri (PDB) olsa da pod sonlandırma yetkisiz kullanım süresi kalan düğüm başına boşaltma zaman aşımını aşıyor veya pod hala çalışıyor durumdaysa, ayrıca çizilemez düğümlere neden olabilir.
|
AgentPoolWindowsProfile
Nesne
Windows aracı havuzunun belirli profili.
| Name |
Tür |
Description |
|
disableOutboundNat
|
boolean
|
Windows düğümlerinde OutboundNAT'ın devre dışı bırakılıp bırakılmayacağı. Varsayılan değer yanlıştır. Giden NAT yalnızca küme outboundType NAT Ağ Geçidi ise ve Windows aracı havuzunda düğüm genel IP'sinin etkinleştirilmemesi durumunda devre dışı bırakılabilir.
|
AutoScaleProfile
Nesne
Otomatik ölçeklendirmeyle ilgili belirtimler.
| Name |
Tür |
Description |
|
maxCount
|
integer
(int32)
|
Belirtilen boyutlardaki düğüm sayısı üst sınırı.
|
|
minCount
|
integer
(int32)
|
Belirtilen boyutlardaki en az düğüm sayısı.
|
|
size
|
string
|
AKS 'Standard_E4s_v3', 'Standard_E16s_v3' veya 'Standard_D16s_v5' gibi oluşturma ve ölçeklendirme sırasında kullanacağı VM boyutu.
|
Code
Numaralandırma
Kümenin Çalışıyor mu yoksa Durduruldu mu olduğunu bildirir
| Değer |
Description |
|
Running
|
Küme çalışıyor.
|
|
Stopped
|
Küme durduruldu.
|
createdByType
Numaralandırma
Kaynağı oluşturan kimliğin türü.
| Değer |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
CreationData
Nesne
Kaynak kaynaktan hedef kaynak oluştururken kullanılan veriler.
| Name |
Tür |
Description |
|
sourceResourceId
|
string
(arm-id)
|
Bu, hedef nesneyi oluşturmak için kullanılacak kaynak nesnenin ARM kimliğidir.
|
ErrorAdditionalInfo
Nesne
Kaynak yönetimi hatasına ilişkin ek bilgiler.
| Name |
Tür |
Description |
|
info
|
object
|
Ek bilgiler.
|
|
type
|
string
|
Ek bilgi türü.
|
ErrorDetail
Nesne
Hata ayrıntısı.
| Name |
Tür |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgisi.
|
|
code
|
string
|
Hata kodu.
|
|
details
|
ErrorDetail[]
|
Hata ayrıntıları.
|
|
message
|
string
|
Hata iletisi.
|
|
target
|
string
|
Hata hedefi
|
ErrorResponse
Nesne
Hata yanıtı
GPUDriver
Numaralandırma
GPU sürücülerinin yüklenip yüklenmeyeceği. Belirtilmediğinde, varsayılan olarak Yükle'dir.
| Değer |
Description |
|
Install
|
Sürücüyü yükleyin.
|
|
None
|
Sürücü yüklemesini atlayın.
|
GPUInstanceProfile
Numaralandırma
Desteklenen GPU VM SKU'su için GPU MIG örnek profilini belirtmek üzere kullanılacak GPUInstanceProfile.
| Değer |
Description |
|
MIG1g
|
MIG 1g GPU örnek profili.
|
|
MIG2g
|
MIG 2g GPU örnek profili.
|
|
MIG3g
|
MIG 3g GPU örnek profili.
|
|
MIG4g
|
MIG 4g GPU örneği profili.
|
|
MIG7g
|
MIG 7g GPU örnek profili.
|
GPUProfile
Nesne
Aracı Havuzu için GPU ayarları.
| Name |
Tür |
Description |
|
driver
|
GPUDriver
|
GPU sürücülerinin yüklenip yüklenmeyeceği. Belirtilmediğinde, varsayılan olarak Yükle'dir.
|
IPTag
Nesne
Nesneyle ilişkilendirilmiş IPTag'i içerir.
| Name |
Tür |
Description |
|
ipTagType
|
string
|
IP etiketi türü. Örnek: RoutingPreference.
|
|
tag
|
string
|
Genel IP ile ilişkili IP etiketinin değeri. Örnek: İnternet.
|
KubeletConfig
Nesne
Aracı düğümlerinin Kubelet yapılandırmaları. Daha fazla bilgi için bkz. AKS özel düğüm yapılandırma .
| Name |
Tür |
Description |
|
allowedUnsafeSysctls
|
string[]
|
Güvenli olmayan sysctl veya güvenli olmayan sysctl desenlerinin izin verilen listesi (ile *biten).
|
|
containerLogMaxFiles
|
integer
(int32)
minimum: 2
|
Kapsayıcı için mevcut olabilecek en fazla kapsayıcı günlüğü dosyası sayısı. Sayı 2 ≥ olmalıdır.
|
|
containerLogMaxSizeMB
|
integer
(int32)
|
Döndürülmeden önce kapsayıcı günlük dosyasının en büyük boyutu (örneğin 10Mi).
|
|
cpuCfsQuota
|
boolean
|
CPU sınırlarını belirten kapsayıcılar için CPU CFS kota zorlaması etkinleştirildiyse. Varsayılan değer true'dur.
|
|
cpuCfsQuotaPeriod
|
string
|
CPU CFS kota dönemi değeri. Varsayılan değer :'100ms.' Geçerli değerler, isteğe bağlı kesir ve birim soneki içeren ondalık sayı dizisidir. Örneğin: '300ms', '2h45m'. Desteklenen birimler 'ns', 'us', 'ms', 's', 'm' ve 'h' birimleridir.
|
|
cpuManagerPolicy
|
string
|
Kullanılacak CPU Yöneticisi ilkesi. Varsayılan değer :'none'. Daha fazla bilgi için bkz. Kubernetes CPU yönetim ilkeleri . İzin verilen değerler 'none' ve 'static' değerleridir.
|
|
failSwapOn
|
boolean
|
True olarak ayarlanırsa, düğümde değiştirme etkinse Kubelet'in başlatılamamasına neden olur.
|
|
imageGcHighThreshold
|
integer
(int32)
|
Belirli bir disk kullanımı yüzdesine ulaşıldığında görüntü çöp toplama işleminin her zaman çalıştırıldığı yüzdelik dilim. Görüntü çöp toplamayı devre dışı bırakmak için 100 olarak ayarlayın. Varsayılan değer 85%
|
|
imageGcLowThreshold
|
integer
(int32)
|
Disk kullanım yüzdesinin belirli bir seviyenin altında olduğu durumlarda, görüntü atık toplama işlemi çalıştırılmaz. Bu ayar imageGcHighThreshold değerinden yüksek olamaz. Varsayılan değer 80%
|
|
podMaxPids
|
integer
(int32)
|
Pod başına işlem sayısı üst sınırı.
|
|
topologyManagerPolicy
|
string
|
Kullanılacak Topoloji Yöneticisi ilkesi. Daha fazla bilgi için bkz. Kubernetes Topoloji Yöneticisi. Varsayılan değer :'none'. İzin verilen değerler 'none', 'best-effort', 'restricted' ve 'single-numa-node' değerleridir.
|
KubeletDiskType
Numaralandırma
emptyDir birimlerinin, kapsayıcı çalışma zamanı veri kökünün ve Kubelet kısa ömürlü depolamanın yerleşimini belirler.
| Değer |
Description |
|
OS
|
Kubelet, verileri için işletim sistemi diskini kullanır.
|
|
Temporary
|
Kubelet verileri için geçici diski kullanır.
|
LinuxOSConfig
Nesne
Linux aracı düğümlerinin işletim sistemi yapılandırmaları. Daha fazla bilgi için bkz. AKS özel düğüm yapılandırma .
| Name |
Tür |
Description |
|
swapFileSizeMB
|
integer
(int32)
|
Her düğümde oluşturulacak takas dosyasının MB cinsinden boyutu.
|
|
sysctls
|
SysctlConfig
|
Linux aracı düğümleri için sysctl ayarları.
|
|
transparentHugePageDefrag
|
string
|
Çekirdeğin daha büyük sayfaları kullanılabilir hale getirmek için bellek sıkıştırmasını agresif bir şekilde kullanıp kullanmaması. Geçerli değerler :'always', 'defer', 'defer+madvise', 'madvise' ve 'never'. Varsayılan değer "madvise" şeklindedir. Daha fazla bilgi için bkz. Transparent Hugepages.
|
|
transparentHugePageEnabled
|
string
|
Saydam büyük sayfaların etkinleştirilip etkinleştirilmediği. Geçerli değerler 'always', 'madvise' ve 'never' değerleridir. Varsayılan değer "her zaman"dır. Daha fazla bilgi için bkz. Transparent Hugepages.
|
LocalDNSForwardDestination
Numaralandırma
LocalDNS'den iletilecek DNS sorguları için hedef sunucu.
| Değer |
Description |
|
ClusterCoreDNS
|
DNS sorgularını localDNS'den küme CoreDNS'ye iletin.
|
|
VnetDNS
|
DNS sorgularını localDNS'den sanal ağda yapılandırılan DNS sunucusuna iletin. Bir sanal ağ için birden çok DNS sunucusu yapılandırılmış olabilir.
|
LocalDNSForwardPolicy
Numaralandırma
Yukarı akış DNS sunucusunu seçmek için ilkeyi iletin. Daha fazla bilgi için ileri eklentiye bakın.
| Değer |
Description |
|
Sequential
|
Sıralı yukarı akış DNS sunucusu seçimini uygular. Daha fazla bilgi için ileri eklentiye bakın.
|
|
RoundRobin
|
Hepsini bir kez deneme yukarı akış DNS sunucusu seçimini uygular. Daha fazla bilgi için ileri eklentiye bakın.
|
|
Random
|
Rasgele yukarı akış DNS sunucusu seçimi uygular. Daha fazla bilgi için ileri eklentiye bakın.
|
LocalDNSMode
Numaralandırma
localDNS için etkinleştirme modu.
| Değer |
Description |
|
Preferred
|
Geçerli düzenleyici sürümü bu özelliği destekliyorsa localDNS'yi etkinleştirmeyi tercih edin.
|
|
Required
|
localDNS'yi etkinleştirin.
|
|
Disabled
|
localDNS'yi devre dışı bırakın.
|
LocalDNSOverride
Nesne
localDNS profili için geçersiz kılmalar.
| Name |
Tür |
Default value |
Description |
|
cacheDurationInSeconds
|
integer
(int32)
|
3600
|
Maksimum TTL'yi saniyeler içinde önbelleğe alın. Daha fazla bilgi için önbellek eklentisine bakın.
|
|
forwardDestination
|
LocalDNSForwardDestination
|
ClusterCoreDNS
|
LocalDNS'den iletilecek DNS sorguları için hedef sunucu.
|
|
forwardPolicy
|
LocalDNSForwardPolicy
|
Sequential
|
Yukarı akış DNS sunucusunu seçmek için ilkeyi iletin. Daha fazla bilgi için ileri eklentiye bakın.
|
|
maxConcurrent
|
integer
(int32)
|
1000
|
Eşzamanlı sorgu sayısı üst sınırı. Daha fazla bilgi için ileri eklentiye bakın.
|
|
protocol
|
LocalDNSProtocol
|
PreferUDP
|
LocalDNS'den yukarı akış DNS sunucusuna bağlantılar için TCP'yi zorunlu kılın veya UDP protokolünü tercih edin.
|
|
queryLogging
|
LocalDNSQueryLogging
|
Error
|
localDNS'deki DNS sorguları için günlük düzeyi.
|
|
serveStale
|
LocalDNSServeStale
|
Immediate
|
Eski verileri sunma ilkesi. Daha fazla bilgi için önbellek eklentisine bakın.
|
|
serveStaleDurationInSeconds
|
integer
(int32)
|
3600
|
Saniyeler içinde bayat süre servis yapın. Daha fazla bilgi için önbellek eklentisine bakın.
|
LocalDNSProfile
Nesne
VnetDNS ve KubeDNS geçersiz kılmaları ile düğüm başına yerel DNS'yi yapılandırır. LocalDNS, bir AKS kümesinde DNS çözümlemesinin performansını ve güvenilirliğini artırmaya yardımcı olur. Daha fazla ayrıntı için aka.ms/aks/localdns bakın.
| Name |
Tür |
Default value |
Description |
|
kubeDNSOverrides
|
<string,
LocalDNSOverride>
|
|
KubeDNS geçersiz kılmaları, dnsPolicy:ClusterFirst (KubeDNS trafiği olarak adlandırılır) ile podlardan gelen DNS trafiğine uygulanır.
|
|
mode
|
LocalDNSMode
|
Preferred
|
localDNS için etkinleştirme modu.
|
|
state
|
LocalDNSState
|
|
localDNS'nin sistem tarafından oluşturulan durumu.
|
|
vnetDNSOverrides
|
<string,
LocalDNSOverride>
|
|
VnetDNS geçersiz kılmaları, dnsPolicy:default veya kubelet (VnetDNS trafiği olarak adlandırılır) ile podlardan gelen DNS trafiğine uygulanır.
|
LocalDNSProtocol
Numaralandırma
LocalDNS'den yukarı akış DNS sunucusuna bağlantılar için TCP'yi zorunlu kılın veya UDP protokolünü tercih edin.
| Değer |
Description |
|
PreferUDP
|
localDNS'den yukarı akış DNS sunucusuna bağlantılar için UDP protokolünü tercih edin.
|
|
ForceTCP
|
localDNS'den yukarı akış DNS sunucusuna bağlantılar için TCP protokolünü zorunlu kılın.
|
LocalDNSQueryLogging
Numaralandırma
localDNS'deki DNS sorguları için günlük düzeyi.
| Değer |
Description |
|
Error
|
localDNS'de hata günlüğünü etkinleştirir. Daha fazla bilgi için errors eklentisine bakın.
|
|
Log
|
localDNS'de sorgu günlüğünü etkinleştirir. Daha fazla bilgi için günlük eklentisine bakın.
|
LocalDNSServeStale
Numaralandırma
Eski verileri sunma ilkesi. Daha fazla bilgi için önbellek eklentisine bakın.
| Değer |
Description |
|
Verify
|
Eski verileri doğrulama ile sunun. Öncelikle, süresi dolan girdiyi istemciye göndermeden önce bir girdinin kaynaktan hala kullanılamadığını doğrulayın. Daha fazla bilgi için önbellek eklentisine bakın.
|
|
Immediate
|
Eski verileri hemen sunun. Girişin kaynaktan kullanılabilir olup olmadığını kontrol etmeden önce süresi dolmuş girişi istemciye gönderin. Daha fazla bilgi için önbellek eklentisine bakın.
|
|
Disable
|
Eski verilerin sunulmasını devre dışı bırakın.
|
LocalDNSState
Numaralandırma
localDNS'nin sistem tarafından oluşturulan durumu.
| Değer |
Description |
|
Enabled
|
localDNS etkinleştirildi.
|
|
Disabled
|
localDNS devre dışı bırakıldı.
|
ManualScaleProfile
Nesne
Makine sayısıyla ilgili belirtimler.
| Name |
Tür |
Description |
|
count
|
integer
(int32)
|
Düğüm sayısı.
|
|
size
|
string
|
AKS 'Standard_E4s_v3', 'Standard_E16s_v3' veya 'Standard_D16s_v5' gibi oluşturma ve ölçeklendirme sırasında kullanacağı VM boyutu.
|
OSDiskType
Numaralandırma
Aracı havuzundaki makineler için kullanılacak işletim sistemi disk türü. VM destekliyorsa ve istenen OSDiskSizeGB değerinden daha büyük bir önbellek diske sahipse varsayılan değer 'Kısa Ömürlü'dür. Aksi takdirde, varsayılan olarak 'Yönetilen' olarak gösterilir. Oluşturulduktan sonra değiştirilemez. Daha fazla bilgi için bkz. kısa ömürlü işletim sistemi .
| Değer |
Description |
|
Managed
|
Vm'nin başka bir konağa yeniden yerleştirilmesi gerektiğinde veri kaybını önlemek için Azure, bir sanal makinenin işletim sistemi diskini Azure depolama alanına çoğaltır. Kapsayıcılar yerel durumun kalıcı olması için tasarlanmadığından, bu davranış düşük düğüm sağlama ve daha yüksek okuma/yazma gecikme süresi gibi bazı dezavantajlar sağlarken sınırlı değer sunar.
|
|
Ephemeral
|
Kısa ömürlü işletim sistemi diskleri, tıpkı geçici bir disk gibi yalnızca konak makinede depolanır. Bu, daha hızlı düğüm ölçeklendirme ve küme yükseltmelerinin yanı sıra daha düşük okuma/yazma gecikme süresi sağlar.
|
OSSKU
Numaralandırma
Aracı havuzu tarafından kullanılan işletim sistemi SKU'su belirtir. OSType Linux ise varsayılan değer Ubuntu'dur. OSType Windows ise, Kubernetes <= 1,24 veya Windows2022 olduğunda varsayılan >değer Windows2019'dur.
| Değer |
Description |
|
Ubuntu
|
Düğüm görüntüleri için işletim sistemi olarak Ubuntu kullanın.
|
|
AzureLinux
|
Düğüm görüntüleri için işletim sistemi olarak AzureLinux kullanın. Azure Linux, Microsoft tarafından oluşturulmuş bir konteyner optimize edilmiş Linux dağıtımı olduğunda, daha fazla bilgi için https://aka.ms/azurelinux adresini ziyaret edin.
|
|
AzureLinux3
|
Düğüm görüntüleri için işletim sistemi olarak AzureLinux3 kullanın. Azure Linux, Microsoft tarafından oluşturulmuş bir konteyner optimize edilmiş Linux dağıtımı olduğunda, daha fazla bilgi için https://aka.ms/azurelinux adresini ziyaret edin. Sınırlamalar için şu adresi ziyaret edin https://aka.ms/aks/node-images: . İşletim sistemi geçiş kılavuzu için bkz.https://aka.ms/aks/upgrade-os-version
|
|
CBLMariner
|
Kullanım dışı bırakılmış OSSKU. Microsoft, yeni dağıtımların 'AzureLinux' seçmesini öneriyor.
|
|
Windows2019
|
Düğüm görüntüleri için işletim sistemi olarak Windows2019 kullanın. Sistem düğümü havuzları için desteklenmiyor. Windows2019 yalnızca Windows2019 kapsayıcılarını destekler; Windows2022 kapsayıcılarını çalıştıramaz ve tam tersi de geçerlidir.
|
|
Windows2022
|
Düğüm görüntüleri için işletim sistemi olarak Windows2022 kullanın. Sistem düğümü havuzları için desteklenmiyor. Windows2022 yalnızca Windows2022 kapsayıcılarını destekler; Windows2019 kapsayıcılarını çalıştıramaz ve tam tersi de geçerlidir.
|
|
Ubuntu2204
|
Düğüm görüntüleri için işletim sistemi olarak Ubuntu2204 kullanın, ancak Ubuntu 22.04 tüm düğüm havuzları için desteklenmeyebilir. Sınırlamalar ve desteklenen Kubernetes sürümleri için bkz. https://aka.ms/aks/supported-ubuntu-versions
|
|
Windows2025
|
Düğüm görüntüleri için işletim sistemi olarak Windows2025 kullanın. Sistem düğümü havuzları için desteklenmiyor. Windows2025, Windows2022 ve Windows 2025 konteynerlerini destekler; Windows2019 konteynerlerini çalıştıramaz ve tam tersi de geçerlidir.
|
|
Ubuntu2404
|
Düğüm görüntüleri için işletim sistemi olarak Ubuntu2404 kullanın, ancak Ubuntu 24.04 tüm düğüm havuzları için desteklenmeyebilir. Sınırlamalar ve desteklenen Kubernetes sürümleri için bkz. https://aka.ms/aks/supported-ubuntu-versions
|
|
AzureContainerLinux
|
Düğüm görüntüleri için işletim sistemi olarak Azure Container Linux kullanın. Azure Container Linux, Azure Linux üzerinde inşa edilmiş, değişmez bir dosya sistemine sahip, konteyner için optimize edilmiş, güvenlik odaklı bir Linux işletim sistemidir. ACL, Flatcar Container Linux projesinden türetilmiştir; Flatcar'ın kanıtlanmış konteyner öncelikli, değişmez tasarımı üzerine inşa edilirken, Azure Linux paketleri, hizmet ve Azure ile AKS yaşam döngüsüyle derin entegrasyon ekler. Daha fazla bilgi için bkz. https://aka.ms/azurecontainerlinux.
|
OSType
Numaralandırma
İşletim sistemi türü. Varsayılan değer Linux'tır.
| Değer |
Description |
|
Linux
|
Linux kullanın.
|
|
Windows
|
Windows kullanın.
|
PodIPAllocationMode
Numaralandırma
Pod IP Ayırma Modu. Aracı havuzundaki podlar için IP ayırma modu. podSubnetId ile kullanılmalıdır. Varsayılan değer :'DynamicIndividual'.
| Değer |
Description |
|
DynamicIndividual
|
Her düğüme, podlara atanabilen bitişik olmayan bir IP adresleri listesi atanır. Bu, /16 veya daha küçük boyutlu küçük ve orta bir alt ağı en üst düzeye çıkarmak için daha iyidir. Müşteri açıkça podIPAllocationMode belirtmezse dinamik IP ayırmalı Azure CNI kümesi varsayılan olarak bu moda geçer
|
|
StaticBlock
|
Her düğüm, düğüm başına maxPods değerini karşılamak için blok başına /28 = 16 IP boyutunda statik olarak CIDR blokları ayrılır. CIDR bloklarının sayısı >= (maxPods / 16). Blok, tek bir IP yerine Azure Vnet Özel IP sınırı olan 65K karşısında sayılır. Bu nedenle blok modu, bir kümede geçerli 65.000 pod sınırından daha fazla olan daha büyük iş yüklerini çalıştırmak için uygundur. Bu mod daha büyük /15 veya daha büyük alt ağlarla ölçeklendirmek için daha uygundur
|
PortRange
Nesne
Bağlantı noktası aralığı.
| Name |
Tür |
Description |
|
portEnd
|
integer
(int32)
minimum: 1 maximum: 65535
|
Aralığa dahil edilen maksimum bağlantı noktası. 1 ile 65535 arasında olmalı ve portStart değerinden büyük veya buna eşit olmalıdır.
|
|
portStart
|
integer
(int32)
minimum: 1 maximum: 65535
|
Aralığa dahil edilen en düşük bağlantı noktası. 1 ile 65535 arasında olmalı ve portEnd değerinden küçük veya buna eşit olmalıdır.
|
|
protocol
|
Protocol
|
Bağlantı noktasının ağ protokolü.
|
PowerState
Nesne
Kümenin Güç Durumunu açıklar
| Name |
Tür |
Description |
|
code
|
Code
|
Kümenin Çalışıyor mu yoksa Durduruldu mu olduğunu bildirir
|
Protocol
Numaralandırma
Bağlantı noktasının ağ protokolü.
| Değer |
Description |
|
TCP
|
TCP protokolü.
|
|
UDP
|
UDP protokolü.
|
ScaleDownMode
Numaralandırma
VM'lerin Aracı Havuzlarına nasıl eklendiğini veya bu havuzlardan nasıl kaldırıldığını açıklar.
Faturalandırma durumlarına bakın.
| Değer |
Description |
|
Delete
|
Ölçeği artırma sırasında yeni örnekler oluşturun ve ölçeği azaltma sırasında örnekleri kaldırın.
|
|
Deallocate
|
Ölçeği artırma sırasında serbest bırakılmış örnekleri (varsa) başlatmayı ve ölçeği azaltma sırasında örnekleri serbest bırakmayı deneme.
|
ScaleProfile
Nesne
VirtualMachines aracı havuzunu ölçeklendirmeye ilişkin belirtimler.
| Name |
Tür |
Description |
|
autoscale
|
AutoScaleProfile[]
|
Önceden tanımlanmış bir boyut aralığında VirtualMachines aracı havuzunun otomatik olarak ölçeklendirilmesiyle ilgili belirtimler.
Her profil belirli bir VM SKU'sunu hedef alır ve bağımsız olarak değerlendirilir.
Profiller arasındaki ölçeklendirme kararları, küme otomatik ölçekleyici genişleticisi tarafından yönetilir ve bu genişletici ile ManagedCluster.properties.autoScalerProfile.expanderyapılandırılabilir.
|
|
manual
|
ManualScaleProfile[]
|
VirtualMachines aracı havuzunun sabit bir boyuta ölçeklendirilmesiyle ilgili belirtimler.
|
ScaleSetEvictionPolicy
Numaralandırma
Sanal Makine Ölçek Kümesi çıkarma ilkesi. Çıkarma ilkesi, çıkarıldığında VM ile ne yapılacağını belirtir. Varsayılan değer Sil'dir. Çıkarma hakkında daha fazla bilgi için bkz.
| Değer |
Description |
|
Delete
|
Düğüm havuzunun temel alınan Ölçek Kümesindeki düğümler çıkarıldığında silinir.
|
|
Deallocate
|
Düğüm havuzunun temel alınan Ölçek Kümesindeki düğümler çıkarmadan sonra durduruldu-serbest bırakıldı durumuna ayarlanır. Durdurulmuş serbest bırakılmış durumdaki düğümler işlem kotanıza göre sayılır ve küme ölçeklendirme veya yükseltme ile ilgili sorunlara neden olabilir.
|
ScaleSetPriority
Numaralandırma
Sanal Makine Ölçek Kümesi önceliği.
| Değer |
Description |
|
Spot
|
Spot öncelikli VM'ler kullanılır. Spot düğümler için SLA yoktur. Daha fazla bilgi için bkz. AKS nokta.
|
|
Regular
|
Normal VM'ler kullanılır.
|
SysctlConfig
Nesne
Linux aracı düğümleri için sysctl ayarları.
| Name |
Tür |
Description |
|
fsAioMaxNr
|
integer
(int32)
|
Sysctl ayarı fs.aio-max-nr.
|
|
fsFileMax
|
integer
(int32)
|
Sysctl ayarı fs.file-max.
|
|
fsInotifyMaxUserWatches
|
integer
(int32)
|
Sysctl ayarı fs.inotify.max_user_watches.
|
|
fsNrOpen
|
integer
(int32)
|
Sysctl ayarı fs.nr_open.
|
|
kernelThreadsMax
|
integer
(int32)
|
Kernel.threads-max sysctl ayarı.
|
|
netCoreNetdevMaxBacklog
|
integer
(int32)
|
Sysctl ayarı net.core.netdev_max_backlog.
|
|
netCoreOptmemMax
|
integer
(int32)
|
Sysctl ayarı net.core.optmem_max.
|
|
netCoreRmemDefault
|
integer
(int32)
|
Sysctl ayarı net.core.rmem_default.
|
|
netCoreRmemMax
|
integer
(int32)
|
Sysctl ayarı net.core.rmem_max.
|
|
netCoreSomaxconn
|
integer
(int32)
|
Net.core.somaxconn sysctl ayarı.
|
|
netCoreWmemDefault
|
integer
(int32)
|
Sysctl ayarı net.core.wmem_default.
|
|
netCoreWmemMax
|
integer
(int32)
|
Sysctl ayarı net.core.wmem_max.
|
|
netIpv4IpLocalPortRange
|
string
|
Sysctl ayarı net.ipv4.ip_local_port_range.
|
|
netIpv4NeighDefaultGcThresh1
|
integer
(int32)
|
Sysctl ayarı net.ipv4.neigh.default.gc_thresh1.
|
|
netIpv4NeighDefaultGcThresh2
|
integer
(int32)
|
Sysctl ayarı net.ipv4.neigh.default.gc_thresh2.
|
|
netIpv4NeighDefaultGcThresh3
|
integer
(int32)
|
Sysctl ayarı net.ipv4.neigh.default.gc_thresh3.
|
|
netIpv4TcpFinTimeout
|
integer
(int32)
|
Sysctl ayarı net.ipv4.tcp_fin_timeout.
|
|
netIpv4TcpKeepaliveProbes
|
integer
(int32)
|
Sysctl ayarı net.ipv4.tcp_keepalive_probes.
|
|
netIpv4TcpKeepaliveTime
|
integer
(int32)
|
Sysctl ayarı net.ipv4.tcp_keepalive_time.
|
|
netIpv4TcpMaxSynBacklog
|
integer
(int32)
|
Sysctl ayarı net.ipv4.tcp_max_syn_backlog.
|
|
netIpv4TcpMaxTwBuckets
|
integer
(int32)
|
Sysctl ayarı net.ipv4.tcp_max_tw_buckets.
|
|
netIpv4TcpTwReuse
|
boolean
|
Sysctl ayarı net.ipv4.tcp_tw_reuse.
|
|
netIpv4TcpkeepaliveIntvl
|
integer
(int32)
minimum: 10 maximum: 90
|
Sysctl ayarı net.ipv4.tcp_keepalive_intvl.
|
|
netNetfilterNfConntrackBuckets
|
integer
(int32)
minimum: 65536 maximum: 524288
|
Sysctl ayarı net.netfilter.nf_conntrack_buckets.
|
|
netNetfilterNfConntrackMax
|
integer
(int32)
minimum: 131072 maximum: 2097152
|
Sysctl ayarı net.netfilter.nf_conntrack_max.
|
|
vmMaxMapCount
|
integer
(int32)
|
Sysctl ayarı vm.max_map_count.
|
|
vmSwappiness
|
integer
(int32)
|
Sysctl ayarı vm.swappiness.
|
|
vmVfsCachePressure
|
integer
(int32)
|
Sysctl ayarı vm.vfs_cache_pressure.
|
systemData
Nesne
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
| Name |
Tür |
Description |
|
createdAt
|
string
(date-time)
|
Kaynak oluşturmanın zaman damgası (UTC).
|
|
createdBy
|
string
|
Kaynağı oluşturan kimlik.
|
|
createdByType
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
lastModifiedAt
|
string
(date-time)
|
Kaynağın son değişikliğinin zaman damgası (UTC)
|
|
lastModifiedBy
|
string
|
Kaynağı en son değiştiren kimlik.
|
|
lastModifiedByType
|
createdByType
|
Kaynağı en son değiştiren kimlik türü.
|
UndrainableNodeBehavior
Numaralandırma
Yükseltme sırasında çizilemez düğümlerin davranışını tanımlar. Çizilemeyen düğümlerin en yaygın nedeni Pod Kesinti bütçeleri (PDB) olsa da pod sonlandırma yetkisiz kullanım süresi kalan düğüm başına boşaltma zaman aşımını aşıyor veya pod hala çalışıyor durumdaysa, ayrıca çizilemez düğümlere neden olabilir.
| Değer |
Description |
|
Cordon
|
AKS, engellenen düğümleri kordonlar ve yükseltme sırasında bunları aşırı gerilim düğümleriyle değiştirir. Engellenen düğümler kordonlanır ve aşırı gerilim düğümleri ile değiştirilir. Engellenen düğümler 'kubernetes.azure.com/upgrade-status:Quarantined' etiketine sahip olur. Engellenen her düğüm için bir dalgalanma düğümü korunur. Diğer tüm aşırı gerilim düğümlerini silmek için en iyi çabayı gösterme girişiminde bulunulacaktır. Engellenen düğümleri değiştirmek için yeterli aşırı gerilim düğümü varsa yükseltme işlemi ve yönetilen küme başarısız durumda olur. Aksi takdirde, yükseltme işlemi ve yönetilen küme iptal edilmiş durumda olur.
|
|
Schedule
|
AKS engellenen düğümleri zamanlanabilir olarak işaretler, ancak engellenen düğümler yükseltilmez. Tüm aşırı gerilim düğümlerini silmek için en iyi çabayı gösterme girişiminde bulunulacaktır. Herhangi bir engellenen düğüm varsa yükseltme işlemi ve yönetilen küme başarısız durumda olur.
|
VirtualMachineNodes
Nesne
Aynı vm boyutundaki düğüm grubundaki geçerli durum.
| Name |
Tür |
Description |
|
count
|
integer
(int32)
|
Düğüm sayısı.
|
|
size
|
string
|
Bu düğüm grubunu barındırmak için kullanılan aracıların VM boyutu.
|
VirtualMachinesProfile
Nesne
VirtualMachines aracı havuzundaki belirtimler.
| Name |
Tür |
Description |
|
scale
|
ScaleProfile
|
VirtualMachines aracı havuzunu ölçeklendirmeye ilişkin belirtimler.
|
WorkloadRuntime
Numaralandırma
Bir düğümün çalıştırabileceği iş yükü türünü belirler.
| Değer |
Description |
|
OCIContainer
|
Düğümler, standart OCI kapsayıcı iş yüklerini çalıştırmak için Kubelet kullanır.
|
|
WasmWasi
|
Düğümler WASI sağlayıcısını (Önizleme) kullanarak WASM iş yüklerini çalıştırmak için Krustlet kullanır.
|
|
KataVmIsolation
|
Düğümler, İç İçe VM tabanlı podları etkinleştirmek için (Kata + Cloud Hypervisor + Hyper-V) kullanabilir. Hyper-V kullanımı nedeniyle, AKS düğüm işletim sistemi kendisi Hyper-V'nin iç içe alınmış bir VM'si (kök işletim sistemi)dir. Bu nedenle yalnızca Dv3 serisi gibi İç İçe Sanallaştırmayı destekleyen VM serisiyle kullanılabilir.
|