Set-AzAksCluster
Update or create a managed Kubernetes cluster.
语法
defaultParameterSet (默认值)
Set-AzAksCluster
[-ResourceGroupName] <String>
[-Name] <String>
[[-ServicePrincipalIdAndSecret] <PSCredential>]
[-NodePoolMode <String>]
[-AcrNameToDetach <String>]
[-NodeImageOnly]
[-ControlPlaneOnly]
[-AutoScalerProfile <ManagedClusterPropertiesAutoScalerProfile>]
[-EnableUptimeSLA]
[-EnableOidcIssuer]
[-Location <String>]
[-LinuxProfileAdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeName <String>]
[-NodeMinCount <Int32>]
[-NodeMaxCount <Int32>]
[-EnableNodeAutoScaling]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-NodePoolLabel <Hashtable>]
[-NodePoolTag <Hashtable>]
[-SshKeyValue <String>]
[-AcrNameToAttach <String>]
[-AsJob]
[-Tag <Hashtable>]
[-LoadBalancerAllocatedOutboundPort <Int32>]
[-LoadBalancerManagedOutboundIpCount <Int32>]
[-LoadBalancerOutboundIp <String[]>]
[-LoadBalancerOutboundIpPrefix <String[]>]
[-LoadBalancerIdleTimeoutInMinute <Int32>]
[-ApiServerAccessAuthorizedIpRange <String[]>]
[-EnableApiServerAccessPrivateCluster]
[-ApiServerAccessPrivateDnsZone <String>]
[-EnableApiServerAccessPrivateClusterPublicFQDN]
[-FqdnSubdomain <String>]
[-EnableManagedIdentity]
[-AssignIdentity <String>]
[-AutoUpgradeChannel <String>]
[-DiskEncryptionSetID <String>]
[-DisableLocalAccount]
[-HttpProxy <String>]
[-HttpsProxy <String>]
[-HttpProxyConfigNoProxyEndpoint <String[]>]
[-HttpProxyConfigTrustedCa <String>]
[-AksCustomHeader <Hashtable>]
[-AadProfile <ManagedClusterAADProfile>]
[-WindowsProfileAdminUserPassword <SecureString>]
[-EnableAHUB]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
Set-AzAksCluster
-InputObject <PSKubernetesCluster>
[-NodePoolMode <String>]
[-AcrNameToDetach <String>]
[-NodeImageOnly]
[-ControlPlaneOnly]
[-AutoScalerProfile <ManagedClusterPropertiesAutoScalerProfile>]
[-EnableUptimeSLA]
[-EnableOidcIssuer]
[-Location <String>]
[-LinuxProfileAdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeName <String>]
[-NodeMinCount <Int32>]
[-NodeMaxCount <Int32>]
[-EnableNodeAutoScaling]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-NodePoolLabel <Hashtable>]
[-NodePoolTag <Hashtable>]
[-SshKeyValue <String>]
[-AcrNameToAttach <String>]
[-AsJob]
[-Tag <Hashtable>]
[-LoadBalancerAllocatedOutboundPort <Int32>]
[-LoadBalancerManagedOutboundIpCount <Int32>]
[-LoadBalancerOutboundIp <String[]>]
[-LoadBalancerOutboundIpPrefix <String[]>]
[-LoadBalancerIdleTimeoutInMinute <Int32>]
[-ApiServerAccessAuthorizedIpRange <String[]>]
[-EnableApiServerAccessPrivateCluster]
[-ApiServerAccessPrivateDnsZone <String>]
[-EnableApiServerAccessPrivateClusterPublicFQDN]
[-FqdnSubdomain <String>]
[-EnableManagedIdentity]
[-AssignIdentity <String>]
[-AutoUpgradeChannel <String>]
[-DiskEncryptionSetID <String>]
[-DisableLocalAccount]
[-HttpProxy <String>]
[-HttpsProxy <String>]
[-HttpProxyConfigNoProxyEndpoint <String[]>]
[-HttpProxyConfigTrustedCa <String>]
[-AksCustomHeader <Hashtable>]
[-AadProfile <ManagedClusterAADProfile>]
[-WindowsProfileAdminUserPassword <SecureString>]
[-EnableAHUB]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
IdParameterSet
Set-AzAksCluster
[-Id] <String>
[-NodePoolMode <String>]
[-AcrNameToDetach <String>]
[-NodeImageOnly]
[-ControlPlaneOnly]
[-AutoScalerProfile <ManagedClusterPropertiesAutoScalerProfile>]
[-EnableUptimeSLA]
[-EnableOidcIssuer]
[-Location <String>]
[-LinuxProfileAdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeName <String>]
[-NodeMinCount <Int32>]
[-NodeMaxCount <Int32>]
[-EnableNodeAutoScaling]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-NodePoolLabel <Hashtable>]
[-NodePoolTag <Hashtable>]
[-SshKeyValue <String>]
[-AcrNameToAttach <String>]
[-AsJob]
[-Tag <Hashtable>]
[-LoadBalancerAllocatedOutboundPort <Int32>]
[-LoadBalancerManagedOutboundIpCount <Int32>]
[-LoadBalancerOutboundIp <String[]>]
[-LoadBalancerOutboundIpPrefix <String[]>]
[-LoadBalancerIdleTimeoutInMinute <Int32>]
[-ApiServerAccessAuthorizedIpRange <String[]>]
[-EnableApiServerAccessPrivateCluster]
[-ApiServerAccessPrivateDnsZone <String>]
[-EnableApiServerAccessPrivateClusterPublicFQDN]
[-FqdnSubdomain <String>]
[-EnableManagedIdentity]
[-AssignIdentity <String>]
[-AutoUpgradeChannel <String>]
[-DiskEncryptionSetID <String>]
[-DisableLocalAccount]
[-HttpProxy <String>]
[-HttpsProxy <String>]
[-HttpProxyConfigNoProxyEndpoint <String[]>]
[-HttpProxyConfigTrustedCa <String>]
[-AksCustomHeader <Hashtable>]
[-AadProfile <ManagedClusterAADProfile>]
[-WindowsProfileAdminUserPassword <SecureString>]
[-EnableAHUB]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
说明
Update or create a managed Kubernetes cluster.
示例
Example 1:
Get-AzAksCluster -ResourceGroupName group -Name myCluster | Set-AzAksCluster -NodeCount 5
Set the number of nodes in the Kubernetes cluster to 5.
Example 2: Update an AKS cluster with AutoScalerProfile.
When you update an AKS cluster, you can configure granular details of the cluster autoscaler by changing the default values in the cluster-wide autoscaler profile.
$AutoScalerProfile=@{
ScanInterval="40s"
Expander="priority"
}
$AutoScalerProfile=[Microsoft.Azure.Management.ContainerService.Models.ManagedClusterPropertiesAutoScalerProfile]$AutoScalerProfile
Get-AzAksCluster -ResourceGroupName group -Name myCluster | Set-AzAksCluster -AutoScalerProfile $AutoScalerProfile
Example 3: Update an AKS cluster with AadProfile.
When you update an AKS cluster, you can configure the AAD profile.
$AKSAdminGroup=New-AzADGroup -DisplayName myAKSAdminGroup -MailNickname myAKSAdminGroup
$AadProfile=@{
managed=$true
enableAzureRBAC=$false
adminGroupObjectIDs=[System.Collections.Generic.List[string]]@($AKSAdminGroup.Id)
}
$AadProfile=[Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile]$AadProfile
Set-AzAksCluster -ResourceGroupName myResourceGroup -Name myAKSCluster -AadProfile $AadProfile
参数
-AadProfile
The Azure Active Directory configuration.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AcrNameToAttach
Grant the 'acrpull' role of the specified ACR to AKS Service Principal, e.g. myacr
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AcrNameToDetach
Disable the 'acrpull' role assignment to the ACR specified by name or resource ID, e.g. myacr
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
Aks custom headers used for building Kubernetes network.
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ApiServerAccessAuthorizedIpRange
The IP ranges authorized to access the Kubernetes API server.
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ApiServerAccessPrivateDnsZone
The private DNS zone mode for the cluster.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AsJob
Run cmdlet in the background
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AssignIdentity
ResourceId of user assign managed identity for cluster.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AutoScalerProfile
The parameters to be applied to the cluster-autoscaler.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AutoUpgradeChannel
The upgrade channel for auto upgrade. For more information see https://learn.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel .
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Confirm
Prompts you for confirmation before running the cmdlet.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ControlPlaneOnly
Will only upgrade control plane to target version.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DisableLocalAccount
Local accounts should be disabled on the Managed Cluster.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DiskEncryptionSetID
The resource ID of the disk encryption set to use for enabling encryption.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DnsNamePrefix
The DNS name prefix for the cluster.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableAHUB
Whether to enable Azure Hybrid User Benefits (AHUB) for Windows VMs.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableApiServerAccessPrivateCluster
Whether to create the cluster as a private cluster or not.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableApiServerAccessPrivateClusterPublicFQDN
Whether to create additional public FQDN for private cluster or not.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableManagedIdentity
Using a managed identity to manage cluster resource group.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableNodeAutoScaling
Whether to enable auto-scaler
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableOidcIssuer
Whether to enalbe OIDC issuer feature.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableUptimeSLA
Whether to use use Uptime SLA.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-FqdnSubdomain
The FQDN subdomain of the private cluster with custom private dns zone.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-HttpProxy
The HTTP proxy server endpoint to use.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-HttpProxyConfigNoProxyEndpoint
The endpoints that should not go through proxy.
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-HttpProxyConfigTrustedCa
Alternative CA cert to use for connecting to proxy servers.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-HttpsProxy
The HTTPS proxy server endpoint to use
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Id
Id of a managed Kubernetes cluster
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: ResourceId
参数集
IdParameterSet
Position: 0
必需: True
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
A PSKubernetesCluster object, normally passed through the pipeline.
InputObjectParameterSet
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
-KubernetesVersion
The version of Kubernetes to use for creating the cluster.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LinuxProfileAdminUserName
User name for the Linux Virtual Machines.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: AdminUserName
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerAllocatedOutboundPort
The desired number of allocated SNAT ports per VM.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerIdleTimeoutInMinute
Desired outbound flow idle timeout in minutes.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerManagedOutboundIpCount
Desired managed outbound IPs count for the cluster load balancer.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerOutboundIp
Desired outbound IP resources for the cluster load balancer.
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerOutboundIpPrefix
Desired outbound IP Prefix resources for the cluster load balancer.
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Location
Azure location for the cluster.
Defaults to the location of the resource group.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Name
Kubernetes managed cluster Name.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
defaultParameterSet
Position: 1
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeCount
The default number of nodes for the node pools.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeImageOnly
Will only upgrade the node image of agent pools.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeMaxCount
Maximum number of nodes for auto-scaling
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeMinCount
Minimum number of nodes for auto-scaling.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeName
Unique name of the agent pool profile in the context of the subscription and resource group.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeOsDiskSize
Specifies the size, in GB, of the operating system disk.
参数属性
类型: Int32
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodePoolLabel
Node pool labels used for building Kubernetes network.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodePoolMode
NodePoolMode represents mode of an node pool.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodePoolTag
The tags to be persisted on the agent pool virtual machine scale set.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NodeVmSize
The size of the Virtual Machine.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
Resource Group Name.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
defaultParameterSet
Position: 0
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ServicePrincipalIdAndSecret
The client id and client secret associated with the AAD application / service principal.
参数属性
参数集
defaultParameterSet
Position: 2
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SshKeyValue
SSH key file value or key file path.
Defaults to {HOME}/.ssh/id_rsa.pub.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: SshKeyPath
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SubscriptionId
The ID of the subscription.
By default, cmdlets are executed in the subscription that is set in the current context. If the user specifies another subscription, the current cmdlet is executed in the subscription specified by the user.
Overriding subscriptions only take effect during the lifecycle of the current cmdlet. It does not change the subscription in the context, and does not affect subsequent cmdlets.
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-Tag
Tags to be applied to the resource
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WindowsProfileAdminUserPassword
The administrator password to use for Windows VMs. Password requirement:At least one lower case, one upper case, one special character !@#$%^&*(), the minimum lenth is 12.
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
输出