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

Recap of de:code 2019

Recap of de:code 2019

Slides for in-house study meeting.

Kyohei Mizumoto

June 05, 2019
Tweet

More Decks by Kyohei Mizumoto

Other Decks in Technology

Transcript

  1. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 2/33 Kyohei Mizumoto(@kyohmizu) C#

    Software Engineer Interests Docker/Kubernetes Go Security whoami
  2. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 3/33 de:code 2019 https://www.microsoft.com/ja-jp/events/decode/2019/default.aspx

    The technical conference for all IT engineers hosted by Microsoft Held on 29th, 30th May
  3. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 4/33 de:code 2019 Most

    of sessions are about Microsoft Azure Lots of sessions about AKS The number of introduction examples is increasing Their ervices(cloud services especially) are getting sophisticated More simple, more functional
  4. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 5/33 What I was

    interested in Windows Containers Virtual Kubelet Kubernetes-based Event-driven Autoscaling(KEDA) NetApp Services
  5. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 7/33 Windows Containers on

    k8s https://cloudblogs.microsoft.com/opensource/2019/03/25/windows- server-containers-now-supported-kubernetes/ Single Kubernetes cluster can have both Linux nodes and Windows Server nodes
  6. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 8/33 Windows Containers on

    AKS https://docs.microsoft.com/en-us/azure/aks/windows-container-cli Preview feature Multiple nood pools You need to: Install aks-preview CLI extension Add a Windows Server node pool
  7. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 10/33 Virtual Kubelet https://github.com/Virtual-Kubelet/Virtual-Kubelet

    "Kubernetes API on top, programmable back." Allows the nodes to be backed by other services (ACI, AWS Fargate, IoT Edge etc) Enable the extension of the k8s API into serverless container platforms Denoted to CNCF from Microsoft
  8. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 12/33 Providers Alibaba Cloud

    ECI Provider Azure Container Instances Provider AWS Fargate Provider HashiCorp Nomad Provider OpenStack Zun Provider (Adding a New Provider via the Provider Interface)
  9. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 14/33 Virtual Nodes on

    Azure Portal ACI is added in AKS $ kubectl get node NAME STATUS ROLES AGE -- aks-agentpool-20139558-0 Ready agent 19m aks-agentpool-20139558-1 Ready agent 19m virtual-node-aci-linux Ready agent 17m
  10. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 18/33 How It Works

    KEDA acts as: an agent to activate and deactivate a deployment to scale to/from zero on no events a Kubernetes metrics server to expose rich event data to the HPA to drive scale out
  11. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 20/33 Azure NetApp Files

    https://cloud.netapp.com/azure-netapp-files/ https://docs.microsoft.com/en-us/azure/azure-netapp-files/
  12. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 23/33 Vertual Kubelet with

    AKS https://docs.microsoft.com/en-us/azure/aks/virtual-kubelet Install vertual kubelet(Windows + Linux) Deploy Pods on vertual kubelet nodes
  13. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 24/33 Before You Begin

    Register Container Instances feature provider Initialize Helm Service account for RBAC-enabled clusters $ helm init --service-account tiller
  14. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 25/33 Install $az aks

    install-connector \ --resource-group myResourceGroup \ --name myAKSCluster \ --connector-name virtual-kubelet \ --os-type Both
  15. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 26/33 Validate Vertual Kubelet

    1 node + 2 virtual kubelet nodes $ kubectl get node NAME STATUS -- aks-agentpool-20139558-0 Ready virtual-kubelet-virtual-kubelet-linux-japaneast Ready virtual-kubelet-virtual-kubelet-windows-japaneast Ready
  16. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 27/33 Deploy on Vertual

    Kubelet Pods for virtual kubelet are deployed on the normal node $ kubectl get po -o wide NAME READY STATUS RESTARTS AGE IP NODE -- pod/virtual-kubelet-linux-japaneast-virtual-kubelet-for-aks-87rd2m5 1/1 Running 0 17m 10.244.0.14 aks-agentpool-20139558-0 pod/virtual-kubelet-windows-japaneast-virtual-kubelet-for-aks-9fzw5 1/1 Running 0 17m 10.244.0.15 aks-agentpool-20139558-0
  17. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 28/33 Run Linux Container

    apiVersion: apps/v1 kind: Deployment metadata: name: aci-helloworld spec: replicas: 1 selector: matchLabels: app: aci-helloworld template: metadata: labels: app: aci-helloworld spec: containers: - name: aci-helloworld image: microsoft/aci-helloworld ports: - containerPort: 80 nodeSelector: beta.kubernetes.io/os: linux kubernetes.io/role: agent type: virtual-kubelet tolerations: - key: virtual-kubelet.io/provider operator: Equal value: azure effect: NoSchedule
  18. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 29/33 Run Linux Container

    The pod is running on the linux virtual kubelet node $ kubectl apply -f vk-linux.yaml deployment.apps/aci-helloworld created $ kubectl get po -o wide NAME READY STATUS RESTARTS AGE IP NODE -- aci-helloworld-657c97d89b-7lnpm 1/1 Running 0 65s 40.81.220.187 virtual-kubelet-virtual-kubelet-linux-japaneast
  19. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 30/33 Run Windows Container

    apiVersion: apps/v1 kind: Deployment metadata: name: nanoserver-iis spec: replicas: 1 selector: matchLabels: app: nanoserver-iis template: metadata: labels: app: nanoserver-iis spec: containers: - name: nanoserver-iis image: microsoft/iis:nanoserver ports: - containerPort: 80 nodeSelector: beta.kubernetes.io/os: windows kubernetes.io/role: agent type: virtual-kubelet tolerations: - key: virtual-kubelet.io/provider operator: Equal value: azure effect: NoSchedule
  20. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 31/33 Run Windows Container

    The pod is running on the windows virtual kubelet node $ kubectl apply -f vk-windows.yaml deployment.apps/nanoserver-iis created $ kubectl get po -o wide NAME READY STATUS RESTARTS AGE IP NODE -- nanoserver-iis-6465dc649f-v7q2x 1/1 Running 0 53s 20.43.88.185 virtual-kubelet-virtual-kubelet-windows-japaneast
  21. 2019/6/6 Recap of de:code 2019 127.0.0.1:5500/#1 32/33 Access to the

    Pods Pods on vertual kubelet nodes have public IP address No need to create service resources