There's still a problem with the PowerShell module & Azure Container Service. For now you'll need to use the portal:
Later, if you'd like to try using PowerShell to deploy a cluster, then follow the next section. Otherwise, skip to "Building & Deploying MusicStore"
- Install Azure PowerShell
import-module azurerm
Login-AzureRmAccount # This will bring up the login UI
Get-AzureRmSubscription # View Azure subscriptions available to your account. Pick one for the next step
Get-AzureRmSubscription -SubscriptionName mySub | Select-AzureRmSubscription
Get-AzureRmContext
$app = New-AzureRmADApplication -DisplayName "plang-wink8s-sp" -HomePage "http://..." -IdentifierUris "http://..." -password "..."
New-AzureRmADServicePrincipal -ApplicationId $app.ApplicationId
New-AzureRmRoleAssignment -RoleDefinitionName Contributor -ServicePrincipalName $app.ApplicationId
More details: Use Azure PowerShell to create a service principal to access resources About the Azure Active Directory service principal for a Kubernetes cluster in Azure Container Service
This isn't working quite yet. Needs an update to AzureRm.Compute PowerShell module
# Don't ever share this, but you need to set it
$sshKey = ""
# Adjust these for your deployment
$rgName = "plang-win-k8s_rg"
$masterDnsPrefix= "plangk8s"
$agentDnsPrefix = "winagentgroup"
$location = "westus2"
New-AzureRMResourceGroup -Name $rgName -Location $location -Force
$Container = New-AzureRmContainerServiceConfig -Location $location -OrchestratorType "kubernetes" -MasterDnsPrefix $masterDnsPrefix -AdminUsername "AcsLinuxAdmin" -SshPublicKey $sshKey | Add-AzureRmContainerServiceAgentPoolProfile -Name "AgentPool01" -VmSize "Standard_DS2v2" -DnsPrefix $agentDnsPrefix
New-AzureRmContainerService -ResourceGroupName $rgName -Name "plang-win-k8s" -ContainerService $Container
For more details, see: New-AzureRMResourceGroup New-AzureRmContainerServiceConfig New-AzureRmContainerService
For more details on this, see Deploy an Azure Resource Manager template