Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kubernetes in Azure at Azure Meetup Frankfurt

Kubernetes in Azure at Azure Meetup Frankfurt

Slides for my talk about Azure ACS / AKS at Azure Meetup Frankfurt on March 22 2018

Alexander Zeitler

March 22, 2018
Tweet

More Decks by Alexander Zeitler

Other Decks in Programming

Transcript

  1. Alexander Zeitler CEO / Cloud Solution Architect at PDMLab •

    Microsoft MVP / ASP.NET since 2004 • ASP.NET Web API Advisor since 2011 • Microsoft Azure Advisor since 2014 • Organizer of Azure Meetup Karlsruhe • Using Docker since 2013 https://pdmlab.com [email protected] @alexzeitler_ Azure ACS and Kubernetes 2
  2. Agenda • Deployments/Containers • Containers in Azure • Azure ACS

    / Kubernetes • Azure AKS Azure ACS and Kubernetes 3
  3. Azure ACS and Kubernetes k8s Architecture HTTPS Db Messaging Log

    Auth KV LB Orders Node 3 Node 2 17 Node 1
  4. Azure ACS and Kubernetes k8s Architecture { /* App */

    } Master Node Node Node Node Node Pods Pods Pods 18
  5. Azure ACS and Kubernetes k8s Architecture Master Node Node Node

    Linux Linux/Win Linux/Win Linux/Win ENV ENV ENV ENV 19
  6. Azure ACS and Kubernetes k8s Masters Master Linux ENV apiserver

    CM KV kube-apiserver Front end to control plane REST-API JSON (manifest files) KV-Store persistent state config of the cluster Uses etcd Controller Manager Node Controller Endpoints Controller Namespace Controller kube-scheduler watches apiserver Assigns work to nodes 21
  7. Azure ACS and Kubernetes k8s Masters Master apiserver KV Node

    Node Node kubectl Commands (JSON) CM 22
  8. Azure ACS and Kubernetes k8s Nodes Node Linux/Windows ENV K

    Kubelet kubernetes agent registers node with cluster watches apiserver instantiates pods reports to master endpoint at port :10225 /spec /healthz /pods CR P Container Runtime pull images start / stop containers Docker or rkt kube-proxy Networking Assign IP to Pod All containers in a Pod share IP LB across Pods in services 24
  9. Azure ACS and Kubernetes Desired State Master apiserver KV Node

    kubectl Manifest file (JSON/YAML) CM 3 x nginx Pod nginx Node Pod nginx Node Pod nginx Desired State: OK 26
  10. Azure ACS and Kubernetes Desired State Master apiserver KV Node

    kubectl Manifest file (JSON/YAML) CM 3 x nginx Pod nginx Node Pod nginx Node Pod nginx Desired State: FAILED 27
  11. Azure ACS and Kubernetes Desired State Master apiserver KV Node

    kubectl Manifest file (JSON/YAML) CM 3 x nginx Pod nginx Node Pod nginx Desired State: OK Pod nginx 28
  12. Azure ACS and Kubernetes k8s Pods Pod Environment Namespaces Network

    stack ... n Containers trnsprt link net IPC mount 31
  13. Azure ACS and Kubernetes k8s Scaling Pods Node Pod Node

    Pod Node Pod Node Pod Pod Pod Do Don’t 33
  14. Azure ACS and Kubernetes k8s Services Pod 10.244.2.4 Pod 10.244.2.5

    Pod 10.244.2.6 Pod 10.244.2.7 Pod 10.244.2.8 Service 10.244.2.10 DNS: upstream.myapp 38
  15. Azure ACS and Kubernetes k8s Labels Pod 10.244.2.4 Pod 10.244.2.5

    Pod 10.244.2.6 Pod 10.244.2.7 Pod 10.244.2.8 Service 10.244.2.10 DNS: upstream.myapp p p p p p db db lb p 40
  16. Azure ACS and Kubernetes k8s Deployments • Manifest files (YAML/JSON)

    • Rolling updates + rollbacks • Multiple concurrent versions • blue-green-deployment • Canary releases 42
  17. AKS - Managed Kubernetes in Azure Azure ACS and Kubernetes

    az aks create –n myCluster –g myResourceGroup 45
  18. AKS - Visual Studio Connected Environment Azure ACS and Kubernetes

    https://www.hanselman.com/blog/AnnouncingVisualStudioAndKubernetesVisualStudioConnectedEnvironment.aspx 46
  19. Resources Links • Commands for ACS/ACR/kubectl: https://github.com/PDMLab/acs-kubernetes-talk • Sample App:

    https://github.com/Azure-Samples/azure-voting-app • Kubernetes: https://kubernetes.io/ • Rolling Updates in k8s: https://kubernetes.io/docs/tutorials/kubernetes-basics/update-intro/ • Creating Secrets using kubectl: https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-using- kubectl-create-secret Azure ACS and Kubernetes 49