New-AzAksNodePool
Maak een nieuwe knooppuntgroep in het opgegeven cluster.
Syntax
New-AzAksNodePool
-ResourceGroupName <String>
-ClusterName <String>
-Name <String>
[-Count <Int32>]
[-OsDiskSize <Int32>]
[-VmSize <String>]
[-VnetSubnetID <String>]
[-MaxPodCount <Int32>]
[-OsType <String>]
[-OsSKU <String>]
[-EnableNodePublicIp]
[-NodePublicIPPrefixID <String>]
[-ScaleSetPriority <String>]
[-ScaleSetEvictionPolicy <String>]
[-VmSetType <String>]
[-AvailabilityZone <String[]>]
[-Force]
[-EnableEncryptionAtHost]
[-EnableUltraSSD]
[-LinuxOSConfig <LinuxOSConfig>]
[-KubeletConfig <KubeletConfig>]
[-MaxSurge <String>]
[-PPG <String>]
[-SpotMaxPrice <Double>]
[-EnableFIPS]
[-GpuInstanceProfile <String>]
[-HostGroupID <String>]
[-PodSubnetID <String>]
[-KubernetesVersion <String>]
[-MinCount <Int32>]
[-MaxCount <Int32>]
[-EnableAutoScaling]
[-Mode <String>]
[-NodeLabel <Hashtable>]
[-Tag <Hashtable>]
[-NodeTaint <String[]>]
[-AksCustomHeader <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
New-AzAksNodePool
-Name <String>
-ClusterObject <PSKubernetesCluster>
[-Count <Int32>]
[-OsDiskSize <Int32>]
[-VmSize <String>]
[-VnetSubnetID <String>]
[-MaxPodCount <Int32>]
[-OsType <String>]
[-OsSKU <String>]
[-EnableNodePublicIp]
[-NodePublicIPPrefixID <String>]
[-ScaleSetPriority <String>]
[-ScaleSetEvictionPolicy <String>]
[-VmSetType <String>]
[-AvailabilityZone <String[]>]
[-Force]
[-EnableEncryptionAtHost]
[-EnableUltraSSD]
[-LinuxOSConfig <LinuxOSConfig>]
[-KubeletConfig <KubeletConfig>]
[-MaxSurge <String>]
[-PPG <String>]
[-SpotMaxPrice <Double>]
[-EnableFIPS]
[-GpuInstanceProfile <String>]
[-HostGroupID <String>]
[-PodSubnetID <String>]
[-KubernetesVersion <String>]
[-MinCount <Int32>]
[-MaxCount <Int32>]
[-EnableAutoScaling]
[-Mode <String>]
[-NodeLabel <Hashtable>]
[-Tag <Hashtable>]
[-NodeTaint <String[]>]
[-AksCustomHeader <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
Description
Maak een nieuwe knooppuntgroep in het opgegeven cluster.
Voorbeelden
Een knooppuntgroep maken met standaardparameters
New-AzAksNodePool -ResourceGroupName myResouceGroup -ClusterName myCluster -Name mydefault
Windows Server-container maken op een AKS
$cred = ConvertTo-SecureString -AsPlainText "Password!!123" -Force
New-AzAksCluster -ResourceGroupName myResourceGroup -Name myCluster -WindowsProfileAdminUserName azureuser -WindowsProfileAdminUserPassword $cred -NetworkPlugin azure -NodeVmSetType VirtualMachineScaleSets
New-AzAksNodePool -ResourceGroupName myResourceGroup -ClusterName myCluster -Name win1 -OsType Windows -VmSetType VirtualMachineScaleSets
Maak een knooppuntgroep met LinuxOSConfig en KubeletConfig.
Wanneer u een AKS-knooppuntgroep maakt, kunt u de kubelet- en besturingssysteemconfiguraties opgeven. Het type LinuxOSConfig
en moet respectievelijk zijn Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig
Microsoft.Azure.Management.ContainerService.Models.KubeletConfig
KubeletConfig
.
$linuxOsConfigJsonStr = @'
{
"transparentHugePageEnabled": "madvise",
"transparentHugePageDefrag": "defer+madvise",
"swapFileSizeMB": 1500,
"sysctls": {
"netCoreSomaxconn": 163849,
"netIpv4TcpTwReuse": true,
"netIpv4IpLocalPortRange": "32000 60000"
}
}
'@
$linuxOsConfig = [Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig] ($linuxOsConfigJsonStr | ConvertFrom-Json)
$kubeletConfigStr = @'
{
"failSwapOn": false
}
'@
$kubeletConfig = [Microsoft.Azure.Management.ContainerService.Models.KubeletConfig] ($kubeletConfigStr | ConvertFrom-Json)
New-AzAksNodePool -ResourceGroupName myResourceGroup -ClusterName myAKSCluster -Name mypool -LinuxOSConfig $linuxOsConfig -KubeletConfig $kubeletConfig
Parameters
-AksCustomHeader
Aangepaste Aks-headers
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AvailabilityZone
Beschikbaarheidszones voor knooppunten. Moet VirtualMachineScaleSets AgentPoolType gebruiken.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterName
De naam van de beheerde clusterresource.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterObject
Geef het clusterobject op waarin u een knooppuntgroep wilt maken.
Type: | PSKubernetesCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Count
Het standaardaantal knooppunten voor de knooppuntgroepen.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableAutoScaling
Of automatische schaalaanpassing moet worden ingeschakeld
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableEncryptionAtHost
Of u het besturingssysteem en het gegevensstation op basis van een host wilt inschakelen
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableFIPS
Of u een besturingssysteem met FIPS-functionaliteit wilt gebruiken
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableNodePublicIp
Hiermee wordt aangegeven of het openbare IP-adres voor knooppunten moet worden ingeschakeld.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableUltraSSD
of UltraSSD moet worden ingeschakeld
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Knooppuntgroep maken, zelfs als deze al bestaat
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GpuInstanceProfile
Het GpuInstanceProfile dat moet worden gebruikt om het GPU MIG-exemplaarprofiel op te geven voor de ondersteunde GPU VM-SKU.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostGroupID
De volledig gekwalificeerde resource-id van de toegewezen hostgroep waaruit virtuele machines kunnen worden ingericht, die alleen worden gebruikt in het scenario voor het maken en niet mogen worden gewijzigd nadat deze is ingesteld.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KubeletConfig
De Kubelet-configuratie op de agentpoolknooppunten.
Type: | KubeletConfig |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KubernetesVersion
De versie van Kubernetes die moet worden gebruikt voor het maken van het cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LinuxOSConfig
De besturingssysteemconfiguratie van Linux-agentknooppunten.
Type: | LinuxOSConfig |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxCount
Maximum aantal knooppunten voor automatisch schalen
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxPodCount
Maximum aantal pods dat op het knooppunt kan worden uitgevoerd.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxSurge
Het maximum aantal of het percentage knooppunten dat tijdens de upgrade is toegenomen.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinCount
Minimaal aantal knooppunten voor automatisch schalen.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Mode
De poolmodus
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
De naam van de knooppuntgroep.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodeLabel
Labels voor knooppuntgroepen die worden gebruikt voor het bouwen van een Kubernetes-netwerk.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodePublicIPPrefixID
De resource-id van het openbare IP-voorvoegsel voor de knooppuntgroep.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodeTaint
De knooppunttaints die zijn toegevoegd aan nieuwe knooppunten tijdens het maken en schalen van knooppuntgroepen
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OsDiskSize
Het standaardaantal knooppunten voor de knooppuntgroepen.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OsSKU
OsSKU die moet worden gebruikt om de SKU van het besturingssysteem op te geven. De standaardwaarde is Ubuntu als OSType Linux is. De standaardwaarde is Windows2019 wanneer Kubernetes <= 1.24 of Windows2022 wanneer Kubernetes >= 1.25 is als OSType Windows is.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OsType
OsType dat moet worden gebruikt om het type besturingssysteem op te geven. Kies uit Linux en Windows. Standaard ingesteld op Linux.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PodSubnetID
De id van het subnet waaraan pods worden samengevoegd wanneer deze worden gestart.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PPG
De id voor nabijheidsplaatsingsgroep.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
De naam van de resourcegroep.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScaleSetEvictionPolicy
ScaleSetEvictionPolicy voor het opgeven van verwijderingsbeleid voor virtuele-machineschaalset met lage prioriteit. Standaard verwijderen.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScaleSetPriority
ScaleSetPriority die moet worden gebruikt voor het opgeven van prioriteit van virtuele-machineschaalsets. Standaard ingesteld op normaal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SpotMaxPrice
De maximale prijs (in Amerikaanse dollars) die u bereid bent te betalen voor spot-instanties. Mogelijke waarden zijn een decimale waarde die groter is dan nul of -1, wat aangeeft dat de standaardprijs up-to-demand is.
Type: | Nullable<T>[Double] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
De id van het abonnement. Cmdlets worden standaard uitgevoerd in het abonnement dat is ingesteld in de huidige context. Als de gebruiker een ander abonnement opgeeft, wordt de huidige cmdlet uitgevoerd in het abonnement dat door de gebruiker is opgegeven. Het overschrijven van abonnementen wordt alleen van kracht tijdens de levenscyclus van de huidige cmdlet. Het abonnement wordt niet gewijzigd in de context en heeft geen invloed op volgende cmdlets.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
De tags die moeten worden bewaard in de virtuele-machineschaalset van de agentgroep.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VmSetType
Vertegenwoordigt typen van een knooppuntgroep. Mogelijke waarden zijn: 'VirtualMachineScaleSets', 'AvailabilitySet'
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VmSize
De grootte van de virtuele machine. De standaardwaarde is Standard_D2_v2.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VnetSubnetID
VNet SubnetID geeft de subnet-id van het VNet op.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Invoerwaarden
Uitvoerwaarden
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor