Virtual Kubelet is an application that runs inside a container within a current cluster and masquerades itself as a node. It does this by creating a node resource through the Kubernetes API. It then monitors scheduled Pods the same way an actual Kubelet does. This is the point at which things start to differ. Rather than interact with a host, and with the container runtime on the host, the Virtual Kubelet has modular, embedded backends called providers.

A provider is called by the core Virtual Kubelet logic any time a Pod lifecycle event occurs, to notify the provider it needs to handle a creation, update, deletion, etc of a pod. This allows for numerous possibilities of what a node within a Kubernetes cluster can be backed by. The provider itself doesn’t need to worry about injecting ConfigMaps and Secrets, or implementing a reconciliation loop to determine if something needs to be created, updated or deleted. This is all handled by Virtual Kubelet to make implementing providers as seamless as possible.

Virtual Kubelet Implementation

AKS Virtual Kubelet Implementation

AKS virtual nodes are built on the Virtual Kubelet. The Azure Container Instances provider for the Virtual Kubelet configures an ACI instance as a node in any Kubernetes cluster. When using the Virtual Kubelet ACI provider, pods can be scheduled on an ACI instance as if the ACI instance is a standard Kubernetes node.

AKS Virtual Kubelet Implementation

When using the Virtual Kubelet provider for Azure Container Instances, both Linux and Windows containers can be scheduled on a container instance as if it is a standard Kubernetes node. This configuration allows you to take advantage of both the capabilities of Kubernetes and the management value and cost benefit of container instances. Azure Container Instances (ACI) provide a hosted environment for running containers in Azure. When using ACI, there is no need to manage the underlying compute infrastructure, Azure handles this management for you.

For example, a three node Kubernetes cluster shown below consist of three physical nodes (azure virtual-machines) and configured with Azure advanced networking mode: