Skip to content

Instantly share code, notes, and snippets.

@cwoolum
Created January 6, 2019 19:11
Show Gist options
  • Save cwoolum/4065bd705466645243bdd93f61c9e07e to your computer and use it in GitHub Desktop.
Save cwoolum/4065bd705466645243bdd93f61c9e07e to your computer and use it in GitHub Desktop.
echo "Creating AKS Cluster"
az aks create \
--resource-group $resourceGroupName \
--name kube-api-$envName \
--node-count 2 \
--node-vm-size Standard_A2_v2 \
--enable-addons monitoring \
--network-plugin azure \
--service-cidr 10.0.0.0/16 \
--dns-service-ip 10.0.0.10 \
--docker-bridge-address 172.17.0.1/16 \
--vnet-subnet-id $subnetResourceId \
--service-principal $spId \
--client-secret $spPass \
--aad-server-app-id $serverApplicationId \
--aad-server-app-secret $serverApplicationSecret \
--aad-client-app-id $clientApplicationId \
--aad-tenant-id $tenantId \
--generate-ssh-keys
az extension add --source https://aksvnodeextension.blob.core.windows.net/aks-virtual-node/aks_virtual_node-0.2.0-py2.py3-none-any.whl --yes
nodeSubnetName="subnet-api-$envName-vnodes"
az aks enable-addons \
--resource-group $resourceGroupName \
--name kube-api-$envName \
--addons virtual-node \
--subnet-name $nodeSubnetName
az aks get-credentials --resource-group $resourceGroupName --name kube-api-$envName --admin
kubectl apply -f helm-rbac.yaml
helm init --service-account tiller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment