Sample Code / Snippets for .NET Developer Conference 2018 #netdc18 Slides
Otherwise AKS Cluster deployment will fail with this error:
Message: The subscription is not registered to use namespace ‘Microsoft.OperationsManagement’. See https://aka.ms/rps-not-found for how to register subscriptions
https://dotnet.microsoft.com/download/dotnet-core/current
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
az login
az account set --subscription <subscriptionId>
az group create --name netdc18 --location westeurope
az aks create --resource-group netdc18 --name netdc18 --node-count 1 --enable-addons monitoring --generate-ssh-keys
az aks install-cli
az aks browse --resource-group netdc18 --name netdc18
Create a ClusterRoleBinding
for RBAC-Clusters (like AKS)
https://docs.microsoft.com/de-de/azure/aks/kubernetes-dashboard#for-rbac-enabled-clusters
Otherwise you'll get errors when opening the dashboard:
docker build -t pdmlab/netdc18-frontend .
docker build -t pdmlab/netdc18-backend .
docker push pdmlab/netdc18-frontend
docker push pdmlab/netdc18-backend
(Replace pdmlab
with your Docker Hub username/organization)
kubectl apply -f deployment.yaml
kubectl create namespace netdc18private
kubectl --namespace=netdc18private create secret docker-registry regcred --docker-server=netdc18.azurecr.io --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
docker login -p <youracrpassword> -u <youracruser> netdc18.azurecr.io
docker build -t netdc18.azurecr.io/netdc18-frontend .
docker build -t netdc18.azurecr.io/netdc18-backend .
docker push netdc18.azurecr.io/netdc18-frontend
docker push netdc18.azurecr.io/netdc18-backend
kubectl --namespace=netdc18private apply -f deployment-private.yaml
az aks scale --name netdc18 --resource-group netdc18 --node-count 1
az aks upgrade --name netdc18 --resource-group netdc18 --kubernetes-version 1.9.6