New-​Azure​Rm​Container​Service

Creates a container service.

Syntax

New-AzureRmContainerService
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-ContainerService] <ContainerService>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmContainerService cmdlet creates a container service. Specify a container service object that you can create by using the New-AzureRmContainerServiceConfig cmdlet.

Examples

Example 1: Create a container service

PS C:\> New-AzureRMResourceGroup -Name "ResourceGroup17" -Location "Australia Southeast" -Force
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"
PS C:\> New-AzureRmContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17" -ContainerService $Container

The first command creates a resource group named ResourceGroup17 at the specified location. For more information, see the New-AzureRmResourceGroup cmdlet.

The second command creates a container, and then stores it in the $Container variable. For more information, see the New-AzureRmContainerServiceConfig cmdlet.

The final command creates a container service for the container stored in $Container. The service is named csResourceGroup17.

Required Parameters

-ContainerService

Specifies a container service object that contains the properties for the new service. To obtain a ContainerService object, use the New-AzureRmContainerServiceConfig cmdlet.

Type:ContainerService
Position:3
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the container service that this cmdlet creates.

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

Specifies the resource group in which this cmdlet deploys the container service.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value: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:False
Accept pipeline input:False
Accept wildcard characters:False