1. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 1/33
Recap of de:code 2019
2. 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
3. 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
4. 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
5. 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
6. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 6/33
Windows Containers
7. 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
8. 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
9. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 9/33
Virtual Kubelet
10. 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
12. 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)
13. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 13/33
Virtual Nodes on Azure Portal
14. 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
16. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 16/33
https://github.com/kedacore/keda
Kubernetes-based Event-driven Autoscaling
0-1 autoscaling
Run on both the Cloud and the Edge
18. 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
19. 2019/6/6 Recap of de:code 2019
127.0.0.1:5500/#1 19/33
NetApp Services
23. 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
24. 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
25. 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
26. 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
27. 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
29. 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
31. 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
32. 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