How to install IoT Edge on Kubernetes

You can install IoT Edge on Kubernetes using KubeVirt technology. KubeVirt is an open-source project from the Cloud Native Computing Foundation (CNCF) that provides a Kubernetes virtualization API and runtime to define and manage virtual machines.

Architecture

Screenshot showing IoT Edge on Kubernetes with KubeVirt.

Note Description
1 Install KubeVirt custom resource definitions (CRDs) into the Kubernetes cluster. Like the Kubernetes cluster, management and updates to KubeVirt components are outside the purview of IoT Edge.
2 A KubeVirt VirtualMachine custom resource is used to define a Virtual Machine with required resources and base operating system. A running instance of this resouce is created in a Kubernetes Pod using KVM and QEMU technologies. If your Kubernetes node itself is a Virtual Machine, you'll need to enable Nested Virtualization to use KubeVirt.
3 The environment inside the QEMU container is just like an OS environment. IoT Edge and its dependencies (like the Docker container engine) can be setup using standard installation instructions or a cloud-init script.

Sample

A functional sample for running IoT Edge on Azure Kubernetes Service (AKS) with KubeVirt is available at https://aka.ms/iotedge-kubevirt.