New-AzNetworkCloudKubernetesCluster
Create a new Kubernetes cluster or update the properties of the existing one.
Syntax
Default (Default)
New-AzNetworkCloudKubernetesCluster
-KubernetesClusterName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-IfMatch <String>]
[-IfNoneMatch <String>]
-ControlPlaneNodeConfigurationCount <Int64>
-ControlPlaneNodeConfigurationVMSkuName <String>
-ExtendedLocationName <String>
-ExtendedLocationType <String>
-InitialAgentPoolConfiguration <IInitialAgentPoolConfiguration[]>
-KubernetesVersion <String>
-Location <String>
-NetworkConfigurationCloudServicesNetworkId <String>
-NetworkConfigurationCniNetworkId <String>
[-AadConfigurationAdminGroupObjectId <String[]>]
[-AdminUsername <String>]
[-AttachedNetworkConfigurationL2Network <IL2NetworkAttachmentConfiguration[]>]
[-AttachedNetworkConfigurationL3Network <IL3NetworkAttachmentConfiguration[]>]
[-AttachedNetworkConfigurationTrunkedNetwork <ITrunkedNetworkAttachmentConfiguration[]>]
[-BgpAdvertisement <IBgpAdvertisement[]>]
[-BgpIPAddressPool <IIPAddressPool[]>]
[-BgpPeer <IServiceLoadBalancerBgpPeer[]>]
[-BgpServiceLoadBalancerConfigurationFabricPeeringEnabled <FabricPeeringEnabled>]
[-ControlPlaneNodeConfigurationAdminPublicKey <ISshPublicKey[]>]
[-ControlPlaneNodeConfigurationAdminUsername <String>]
[-ControlPlaneNodeConfigurationAvailabilityZone <String[]>]
[-L2ServiceLoadBalancerConfigurationIPAddressPool <IIPAddressPool[]>]
[-ManagedResourceGroupConfigurationLocation <String>]
[-ManagedResourceGroupConfigurationName <String>]
[-NetworkConfigurationDnsServiceIP <String>]
[-NetworkConfigurationPodCidr <String[]>]
[-NetworkConfigurationServiceCidr <String[]>]
[-SshPublicKey <ISshPublicKey[]>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a new Kubernetes cluster or update the properties of the existing one.
Examples
Example 1: Create Kubernetes cluster
$tagHash = @{tags = "tag1" }
$agentPoolConfiguration = @{
count = 1
mode = "System"
name = "agentPoolName"
vmSkuName = "vmSkuName"
administratorConfiguration = "administratorConfiguration"
}
$sshPublicKey = @{
KeyData = "ssh-rsa aaaKyfsdx= fakekey@vm"
}
New-AzNetworkCloudKubernetesCluster -ResourceGroupName resourceGroupName `
-KubernetesClusterName default -Location location `
-ExtendedLocationName extendedLocationName `
-ExtendedLocationType "CustomLocation" `
-KubernetesVersion kubernetesVersion `
-AadConfigurationAdminGroupObjectId adminGroupObjectIds `
-AdminUsername "azureuser" `
-SshPublicKey $sshPublicKey `
-InitialAgentPoolConfiguration $agentPoolConfiguration `
-NetworkConfigurationCloudServicesNetworkId cloudServicesNetworkId `
-NetworkConfigurationCniNetworkId cniNetworkId `
-SubscriptionId subscriptionId `
-Tag $tagHash
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- -----------------
eastus default 08/09/2023 20:23:17 <identity> User 08/09/2023 20:44:27 <identity> Application resourceGroupName
This command creates a Kubernetes cluster.
Parameters
-AadConfigurationAdminGroupObjectId
The list of Azure Active Directory group object IDs that will have an administrative role on the Kubernetes cluster.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AdminUsername
The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes.
If not supplied, a user name will be chosen by the service.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AttachedNetworkConfigurationL2Network
The list of Layer 2 Networks and related configuration for attachment.
To construct, see NOTES section for ATTACHEDNETWORKCONFIGURATIONL2NETWORK properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IL2NetworkAttachmentConfiguration [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AttachedNetworkConfigurationL3Network
The list of Layer 3 Networks and related configuration for attachment.
To construct, see NOTES section for ATTACHEDNETWORKCONFIGURATIONL3NETWORK properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IL3NetworkAttachmentConfiguration [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AttachedNetworkConfigurationTrunkedNetwork
The list of Trunked Networks and related configuration for attachment.
To construct, see NOTES section for ATTACHEDNETWORKCONFIGURATIONTRUNKEDNETWORK properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.ITrunkedNetworkAttachmentConfiguration [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpAdvertisement
The association of IP address pools to the communities and peers, allowing for announcement of IPs.
To construct, see NOTES section for BGPADVERTISEMENT properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IBgpAdvertisement [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpIPAddressPool
The list of pools of IP addresses that can be allocated to load balancer services.
To construct, see NOTES section for BGPIPADDRESSPOOL properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IIPAddressPool [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpPeer
The list of additional BgpPeer entities that the Kubernetes cluster will peer with.
All peering must be explicitly defined.
To construct, see NOTES section for BGPPEER properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IServiceLoadBalancerBgpPeer [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpServiceLoadBalancerConfigurationFabricPeeringEnabled
The indicator to specify if the load balancer peers with the network fabric.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ControlPlaneNodeConfigurationAdminPublicKey
The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster.
In some cases, specification of public keys may be required to produce a working environment.
To construct, see NOTES section for CONTROLPLANENODECONFIGURATIONADMINPUBLICKEY properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.ISshPublicKey [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ControlPlaneNodeConfigurationAdminUsername
The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes.
If not supplied, a user name will be chosen by the service.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ControlPlaneNodeConfigurationAvailabilityZone
The list of availability zones of the Network Cloud cluster to be used for the provisioning of nodes in the control plane.
If not specified, all availability zones will be used.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ControlPlaneNodeConfigurationCount
The number of virtual machines that use this configuration.
Parameter properties
Type: Int64
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ControlPlaneNodeConfigurationVMSkuName
The name of the VM SKU supplied during creation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ExtendedLocationName
The resource ID of the extended location on which the resource will be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ExtendedLocationType
The extended location type, for example, CustomLocation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IfMatch
The ETag of the transformation.
Omit this value to always overwrite the current resource.
Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IfNoneMatch
Set to '*' to allow a new record set to be created, but to prevent updating an existing resource.
Other values will result in error from server as they are not supported.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InitialAgentPoolConfiguration
The agent pools that are created with this Kubernetes cluster for running critical system services and workloads.
This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster.
After creation, the management of agent pools is done using the agentPools sub-resource.
To construct, see NOTES section for INITIALAGENTPOOLCONFIGURATION properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IInitialAgentPoolConfiguration [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KubernetesClusterName
The name of the Kubernetes cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KubernetesVersion
The Kubernetes version for this cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-L2ServiceLoadBalancerConfigurationIPAddressPool
The list of pools of IP addresses that can be allocated to load balancer services.
To construct, see NOTES section for L2SERVICELOADBALANCERCONFIGURATIONIPADDRESSPOOL properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IIPAddressPool [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
The geo-location where the resource lives
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagedResourceGroupConfigurationLocation
The location of the managed resource group.
If not specified, the location of the parent resource is chosen.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagedResourceGroupConfigurationName
The name for the managed resource group.
If not specified, the unique name is automatically generated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkConfigurationCloudServicesNetworkId
The resource ID of the associated Cloud Services network.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkConfigurationCniNetworkId
The resource ID of the Layer 3 network that is used for creation of the Container Networking Interface network.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkConfigurationDnsServiceIP
The IP address assigned to the Kubernetes DNS service.
It must be within the Kubernetes service address range specified in service CIDR.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkConfigurationPodCidr
The CIDR notation IP ranges from which to assign pod IPs.
One IPv4 CIDR is expected for single-stack networking.
Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkConfigurationServiceCidr
The CIDR notation IP ranges from which to assign service IPs.
One IPv4 CIDR is expected for single-stack networking.
Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SshPublicKey
The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster.
In some cases, specification of public keys may be required to produce a working environment.
To construct, see NOTES section for SSHPUBLICKEY properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.ISshPublicKey [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
The value must be an UUID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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 .
Outputs
Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.Api20250201.IKubernetesCluster