Breaking

Friday, April 9, 2021

Azure AKS- Scale out to ACI through virtual nodes

One of the nice features of AKS(Azure Kubernetes Service) is that you can create a virtual nodes that can be used to scale out to ACI.

This feature is really useful in following scenario’s:

  • Temporary burst of capacity
  • On-demand processing, e.g. batch jobs
  • Isolated processing for untrusted code

The virtual nodes feature is build on top of the Virtual Kubelet technology.

To enable this feature you need to extend the deployment yaml with the configuration below. This configuration will first try to schedule the pod on the default node pools. If not enough resources are available, the pod will be scheduled on the virtual node:

kind: Deployment
apiVersion: apps/v1
metadata:
...
spec:
replicas: 1
selector:
...
template:
metadata:
...
spec:
volumes:
...
containers:
...
...
tolerations:
- key: virtual-kubelet.io/provider
value: azure
operator: Equal
effect: NoSchedule
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet
view raw deployment.yaml hosted with ❤ by GitHub

A good introduction can be found here:

 

Remark: Virtual nodes only supports Linux pods at the moment of writing

No comments:

Post a Comment