New-​Azure​Rm​Container​Service​Config

Creates a local configuration object for a container service.

Syntax

New-AzureRmContainerServiceConfig
   [[-Location] <String>]
   [[-Tag] <Hashtable>]
   [[-VmDiagnosticsEnabled] <Boolean>]
   [[-OrchestratorType] <ContainerServiceOrchestratorTypes>]
   [[-MasterCount] <Int32>]
   [[-MasterDnsPrefix] <String>]
   [[-AgentPoolProfile] <ContainerServiceAgentPoolProfile[]>]
   [[-WindowsProfileAdminUsername] <String>]
   [[-WindowsProfileAdminPassword] <String>]
   [[-AdminUsername] <String>]
   [[-SshPublicKey] <String[]>]
   [-CustomProfileOrchestrator <String>]
   [-ServicePrincipalProfileClientId <String>]
   [-ServicePrincipalProfileSecret <String>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmContainerServiceConfig cmdlet creates a local configuration object for a container service. Provide this object to the New-AzureRmContainerService cmdlet to create a container service.

Examples

Example 1: Create a container service configuration

PS C:\> $Container = New-AzureRmContainerServiceConfig -Location "Australia Southeast" -OrchestratorType "DCOS" -MasterDnsPrefix "MasterResourceGroup17" -AdminUsername "AcsLinuxAdmin" -SshPublicKey "<ssh-key>" | Add-AzureRmContainerServiceAgentPoolProfile -Name "AgentPool01" -VmSize "Standard_A1" -DnsPrefix "APResourceGroup17"

This command creates a container, and then stores it in the $Container variable.

The command specifies various settings for the container service configuration. The command passes the configuration object to the Add-AzureRmContainerServiceAgentPoolProfile cmdlet by using the pipeline operator. That cmdlet adds an agent pool profile.

Specify the object in $Container for the ContainerService parameter of New-AzureRmContainerService.

Optional Parameters

-AdminUsername

Specifies the administrator account name to use for a Linux-based container service.

Type:String
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AgentPoolProfile

Specifies an array of agent pool profile objects for the container service. Add a profile by using the Add-AzureRmContainerServiceAgentPoolProfile cmdlet.

Type:ContainerServiceAgentPoolProfile[]
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-CustomProfileOrchestrator

Specifies the custom profile orchestrator.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Location

Specifies the location in which to create the container service.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MasterCount

Specifies the number of master virtual machines to create.

Type:Int32
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MasterDnsPrefix

Specifies the DNS prefix for the master virtual machine.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-OrchestratorType

Specifies the type of orchestrator for the container service. The acceptable values for this parameter are: DCOS and Swarm.

Type:ContainerServiceOrchestratorTypes
Parameter Sets:Swarm, DCOS, Custom, Kubernetes
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServicePrincipalProfileClientId

Specifies the principal profile client ID.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServicePrincipalProfileSecret

Specifies the principal profile secret.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SshPublicKey

Specifies the SSH public key for a Linux-based container service.

Type:String[]
Position:9
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

Specifies tags for the container service.

Type:Hashtable
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VmDiagnosticsEnabled

Indicates whether this configuration enables diagnostics for the container service virtual machine.

Type:Boolean
Position:10
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-WindowsProfileAdminPassword

Specifies the administrator password for a container service that uses the Windows operating system.

Type:String
Position:7
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WindowsProfileAdminUsername

Specifies the administrator username for a container service that uses the Windows operating system.

Type:String
Position:6
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False