In this session, see how Tailwind Traders took a containerized application and deployed it to Azure Kubernetes Service (AKS). You’ll walk away with a deep understanding of major Kubernetes concepts and how to put it all to use with industry standard tooling.
2. App Intro
AKS architecture
Scale
Network & Security
Handling Failures
Tailwind Traders
Introduction to Kubernetes and components
Scale your applications in and out
Pod identity and Calico network policies
Cluster and Application Error Management
11. AKS Architecture - Virtual Node
Azure Container
Instances (ACI)
Pods
Virtual
node
Node
Pods
Node
Pods
Kubernetes control plane
12. AKS Architecture - Availability Zones
Region*
AKS AZs
Region*
AKS AZs
Region*
AKS AZs
13. Create a resource group
az group create
-l <Azure region>
-n myResGroupThis is holding all the
resources for our cluster
az commands
14. az network vnet create
--resource-group myResGroup
--name myVnet
--address-prefixes 10.0.0.0/8
--subnet-name myVnetSub
--subnet-prefix 10.240.0.0/16
Create vnet
az commands
Also we create a subnet
for our cluster
15. az network vnet subnet create
--resource-group myResGroup
--vnet-name myVnet
--name VNSubnet
--address-prefix 10.241.0.0/16
Create a subnet
az commands
Create a subnet for virtual
node
16. mySPk8s
Create a service principal
az commands
The service principal
allows us to create other
cloud resources
17. az aks create
--resource-group myResGroup
--name myAKSCluster
--node-count 3
--generate-ssh-keys
Create a base AKS Cluster
az commands
Basic cluster
18. az aks create
--resource-group myResGroup
--name myAKSCluster
--node-count 3
--service-principal <appId>
--client-secret <password>
--generate-ssh-keys
--network-plugin azure
--dns-service-ip $KUBE_DNS_IP
--docker-bridge-address 172.17.0.1/16
--vnet-subnet-id <vnet id>
--load-balancer-sku standard
--enable-vmss
--node-zones 1 2 3
Create an AKS Cluster
az commands
All addon flags
22. Feature Request From Management
Management has asked us for a new service. The service
must
✓ Generate customer recommendations off previous orders
✓ Service must be its own deployable artifact
✓ Must have a documented API to interface with existing
services
27. Virtual Node Supports
▰ Linux containers
▰ Windows containers
▰ GPU
Tip
In the backend Virtual
node is using Helm to
deploy the binary needed
to connect to ACI
28. 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
Tell Your Pods to Use Virtual
Node
Example.yaml
When using virtual node you
need to specify virtual node
in the node selector
42. Availability Zones
Resiliency to data centre failures
Nodes are split across 3 datacenters in a region
Gives us fault domains to plan our deployments around.
Manually bring failed nodes back to your cluster
1
2
3
4
43. Availability zones is in public beta
aka.ms/AKSavailability
Availability
zones is in
public beta
44. Handling Application Failure
Use deployments with replication set to the number of
zones you are using
Use an ingress controller that is highly available
Understand your disk mounts in pods
2
3
1