New-AzureRmAks
Create a new managed Kubernetes cluster.
Caution
Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.
To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.
Syntax
New-AzureRmAks
[-Force]
[-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>]
Description
Create a new managed Kubernetes cluster.
Examples
Example 1
Create a new managed Kubernetes cluster with default params.
PS C:\> New-AzureRmAks -ResourceGroupName group -Name myCluster
Parameters
-AdminUserName
User name for the Linux Virtual Machines.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
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 |
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 |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DnsNamePrefix
The DNS name prefix for the cluster.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Create cluster even if it already exists
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KubernetesVersion
The version of Kubernetes to use for creating the cluster.
Type: | String |
Position: | Named |
Default value: | None |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Kubernetes managed cluster Name.
Type: | String |
Position: | 1 |
Default value: | None |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodeOsDiskSize
Size in GB of the OS disk for each node in the node pool. Minimum 30 GB.
Type: | Int32 |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NodeVmSize
The size of the Virtual Machine.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
Tags to be applied to the resource
Type: | Hashtable |
Position: | Named |
Default value: | None |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None