New-AzContainerServiceConfig
Creates a local configuration object for a container service.
Syntax
New-AzContainerServiceConfig
[[-Location] <String>]
[[-Tag] <Hashtable>]
[[-OrchestratorType] <ContainerServiceOrchestratorTypes>]
[[-MasterCount] <Int32>]
[[-MasterDnsPrefix] <String>]
[[-AgentPoolProfile] <ContainerServiceAgentPoolProfile[]>]
[[-WindowsProfileAdminUsername] <String>]
[[-WindowsProfileAdminPassword] <String>]
[[-AdminUsername] <String>]
[[-SshPublicKey] <String[]>]
[[-VmDiagnosticsEnabled] <Boolean>]
[-CustomProfileOrchestrator <String>]
[-ServicePrincipalProfileClientId <String>]
[-ServicePrincipalProfileSecret <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzContainerServiceConfig cmdlet creates a local configuration object for a container service. Provide this object to the New-AzContainerService cmdlet to create a container service.
Examples
Example 1: Create a container service configuration
PS C:\> $Container = New-AzContainerServiceConfig -Location "Australia Southeast" -OrchestratorType "DCOS" -MasterDnsPrefix "MasterResourceGroup17" -AdminUsername "AcsLinuxAdmin" -SshPublicKey "<ssh-key>"
PS C:\> $Container | Add-AzContainerServiceAgentPoolProfile -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-AzContainerServiceAgentPoolProfile cmdlet by using the pipeline operator. That cmdlet adds an agent pool profile.
Specify the object in $Container for the ContainerService parameter of New-AzContainerService.
Parameters
-AdminUsername
Specifies the administrator account name to use for a Linux-based container service.
Type: | String |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AgentPoolProfile
Specifies an array of agent pool profile objects for the container service. Add a profile by using the Add-AzContainerServiceAgentPoolProfile cmdlet.
Type: | ContainerServiceAgentPoolProfile[] |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-CustomProfileOrchestrator
Specifies the custom profile orchestrator.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-Location
Specifies the location in which to create the container service.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MasterCount
Specifies the number of master virtual machines to create.
Type: | Int32 |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MasterDnsPrefix
Specifies the DNS prefix for the master virtual machine.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
Accepted values: | Swarm, DCOS, Custom, Kubernetes |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServicePrincipalProfileClientId
Specifies the principal profile client ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServicePrincipalProfileSecret
Specifies the principal profile secret.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SshPublicKey
Specifies the SSH public key for a Linux-based container service.
Type: | String[] |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Type: | Hashtable |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VmDiagnosticsEnabled
Indicates whether this configuration enables diagnostics for the container service virtual machine.
Type: | Boolean |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-WindowsProfileAdminPassword
Specifies the administrator password for a container service that uses the Windows operating system.
Type: | String |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
None
This cmdlet does not accept any input.