Set-AzAksCluster
Update or create a managed Kubernetes cluster.
Set-AzAksCluster
[-NodePoolMode <String>]
[-AcrNameToDetach <String>]
[-NodeImageOnly]
[-ControlPlaneOnly]
[-AutoScalerProfile <ManagedClusterPropertiesAutoScalerProfile>]
[-EnableUptimeSLA]
[-EnableOidcIssuer]
[-ResourceGroupName] <String>
[-Name] <String>
[[-ServicePrincipalIdAndSecret] <PSCredential>]
[-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>]
Set-AzAksCluster
[-NodePoolMode <String>]
[-AcrNameToDetach <String>]
[-NodeImageOnly]
[-ControlPlaneOnly]
[-Id] <String>
[-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.
Get-AzAksCluster -ResourceGroupName group -Name myCluster | Set-AzAksCluster -NodeCount 5
Set the number of nodes in the Kubernetes cluster to 5.
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
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
The Azure Active Directory configuration.
Type: | ManagedClusterAADProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Grant the 'acrpull' role of the specified ACR to AKS Service Principal, e.g. myacr
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Disable the 'acrpull' role assignment to the ACR specified by name or resource ID, e.g. myacr
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Aks custom headers used for building Kubernetes network.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The IP ranges authorized to access the Kubernetes API server.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The private DNS zone mode for the cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
ResourceId of user assign managed identity for cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The parameters to be applied to the cluster-autoscaler.
Type: | ManagedClusterPropertiesAutoScalerProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The upgrade channel for auto upgrade. For more information see https://learn.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Will only upgrade control plane to target version.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Local accounts should be disabled on the Managed Cluster.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The resource ID of the disk encryption set to use for enabling encryption.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The DNS name prefix for the cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to enable Azure Hybrid User Benefits (AHUB) for Windows VMs.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to create the cluster as a private cluster or not.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to create additional public FQDN for private cluster or not.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Using a managed identity to manage cluster resource group.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to enable auto-scaler
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to enalbe OIDC issuer feature.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether to use use Uptime SLA.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The FQDN subdomain of the private cluster with custom private dns zone.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The HTTP proxy server endpoint to use.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The endpoints that should not go through proxy.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Alternative CA cert to use for connecting to proxy servers.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The HTTPS proxy server endpoint to use
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Id of a managed Kubernetes cluster
Type: | String |
Aliases: | ResourceId |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
A PSKubernetesCluster object, normally passed through the pipeline.
Type: | PSKubernetesCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
The version of Kubernetes to use for creating the cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
User name for the Linux Virtual Machines.
Type: | String |
Aliases: | AdminUserName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The desired number of allocated SNAT ports per VM.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Desired outbound flow idle timeout in minutes.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Desired managed outbound IPs count for the cluster load balancer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Desired outbound IP resources for the cluster load balancer.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Desired outbound IP Prefix resources for the cluster load balancer.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Azure location for the cluster. Defaults to the location of the resource group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Kubernetes managed cluster Name.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The default number of nodes for the node pools.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Will only upgrade the node image of agent pools.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Maximum number of nodes for auto-scaling
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Minimum number of nodes for auto-scaling.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Unique name of the agent pool profile in the context of the subscription and resource group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the size, in GB, of the operating system disk.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Node pool labels used for building Kubernetes network.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
NodePoolMode represents mode of an node pool.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The tags to be persisted on the agent pool virtual machine scale set.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The size of the Virtual Machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The client id and client secret associated with the AAD application / service principal.
Type: | PSCredential |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
SSH key file value or key file path. Defaults to {HOME}/.ssh/id_rsa.pub.
Type: | String |
Aliases: | SshKeyPath |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Tags to be applied to the resource
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: