Git Product home page Git Product logo

aks-netcore-netdc18's Introduction

aks-netcore-netdc18

Sample Code / Snippets for .NET Developer Conference 2018 #netdc18 Slides

Azure DevOps requirements

  • Enable Microsoft.OperationsManagement Resource Provider in subscription

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

ASP.NET Core / SDK-Versions

https://dotnet.microsoft.com/download/dotnet-core/current

Install Azure CLI

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest

Login

az login

Select Subscription

az account set --subscription <subscriptionId>

Create a resource group

az group create --name netdc18 --location westeurope

Create a AKS cluster

az aks create --resource-group netdc18 --name netdc18 --node-count 1 --enable-addons monitoring --generate-ssh-keys

Install kubectl

az aks install-cli

Browse dashboard

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:

Build, tag, push public images

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)

Deploy using public images

kubectl apply -f deployment.yaml

Create a namespace for private image deployment

kubectl create namespace netdc18private

Create k8s secret for Azure ACR

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>

Login to ACR

docker login -p <youracrpassword> -u <youracruser> netdc18.azurecr.io

Build, tag, push private images

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

Deploy using private images

kubectl --namespace=netdc18private apply -f deployment-private.yaml

Scale Cluster

az aks scale --name netdc18 --resource-group netdc18 --node-count 1

Upgrade Cluster

az aks upgrade --name netdc18 --resource-group netdc18 --kubernetes-version 1.9.6

aks-netcore-netdc18's People

Contributors

alexzeitler avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.