Set-AzureRmAks
Update or create a managed Kubernetes cluster.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmAks
[-ResourceGroupName] <String>
[-Name] <String>
[[-ClientIdAndSecret] <PSCredential>]
[-Location <String>]
[-AdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-SshKeyValue <String>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzureRmAks
-InputObject <PSKubernetesCluster>
[-Location <String>]
[-AdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-SshKeyValue <String>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzureRmAks
[-Id] <String>
[-Location <String>]
[-AdminUserName <String>]
[-DnsNamePrefix <String>]
[-KubernetesVersion <String>]
[-NodeCount <Int32>]
[-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>]
[-SshKeyValue <String>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update or create a managed Kubernetes cluster.
Examples
Example 1
PS C:\> Get-AzureRmAks -ResourceGroupName group -Name myCluster | Set-AzureRmAks -NodeCount 5
Set the number of nodes in the Kubernetes cluster to 5.
Parameters
-AdminUserName
User name for the Linux Virtual Machines.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClientIdAndSecret
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 |
-Confirm
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 |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DnsNamePrefix
The DNS name prefix for the cluster.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
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 |
-InputObject
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 |
-KubernetesVersion
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 |
-Location
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 |
-Name
Kubernetes managed cluster Name.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodeCount
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 |
-NodeOsDiskSize
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 |
-NodeVmSize
The size of the Virtual Machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SshKeyValue
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 |
-Tag
Tags to be applied to the resource
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
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 |
Inputs
Parameters: InputObject (ByValue)