Module 3 Lab Instructions
Pre-requisites
- Completion of Module 1, which created AKS with a dedicated subnet, **AciSubnet”” required for ACI (virtual nodes)
- Completion of Module 2, which created the Azure Servie, queues, etc.
Enable virtual node add on
- virtual node needs to be enabled on AKS cluster as an add-on to use it for bursting
- Execute the following az cli commands, replacing the
<resource-group>
with the value from Module 1
az provider register --namespace Microsoft.ContainerInstance
az aks enable-addons \
-g <resource-group> \
--name akscluster \
--addons virtual-node \
--subnet-name aciSubnet
Deploying updated demo app
- In Module 2 order processor app was deployed on a VM nodepool
- In this module, a modified version of the [file]deploy-app.yaml will be applied, so that it gets deployed on virtual nodes, as shown below
nodeSelector:
kubernetes.io/role: agent
beta.kubernetes.io/os: linux
type: virtual-kubelet
tolerations:
- key: virtual-kubelet.io/provider
operator: Exists
- key: azure.com/aci
effect: NoSchedule
- Execute the following cli commands from the repo root directory
kubectl apply -f tools/deploy/module3/deploy-app.yaml --namespace order-processor
Scaling on Virtual Nodes with ALT
- In Module2 ALT was set up to publish messages to ASB queue to scale the demo app.
- For this module, we just need to re-run the same test, and observe scaling of the pod on virtual nodes
- On Azure Load Testing portal page, in
Test
menu, select the test script that was created in Module 2, and click run - At the bottom of Run Review dialog box, click Run
- on a bash shell, execute the following
watch kubectl get pod -n $demo_app_namespace -o wide
- In few seconds, you will notice order-processor pods scaling up to process the messages generated by ALT script
- Notice that the pods are starting up on the virtual nodes
virtual-node-aci-linux