Kata Containers 3.4 Unveiled Featuring Virtualization-Based Isolation

Published project release Kata Containers 3.4, which develops a stack for organizing the execution of containers using isolation based on full-fledged virtualization mechanisms. The project was created by Intel and Hyper by combining technologies Clear Containers And runV. The project code is written in Go and Rust, and distributed by licensed under Apache 2.0. The development of the project is overseen by a working group created under the auspices of the independent organization OpenStack Foundation, which includes companies such as Canonical, China Mobile, Dell/EMC, EasyStack, Google, Huawei, NetApp, Red Hat, SUSE and ZTE.

The basis of Kata is runtime, which allows you to create compact virtual machines that run using a full hypervisor, instead of using traditional containers that use a common Linux kernel and are isolated using namespaces and cgroups. The use of virtual machines allows you to achieve a higher level of security that protects against attacks caused by exploitation of vulnerabilities in the Linux kernel.

Kata Containers is focused on integration into existing container isolation infrastructures with the ability to use similar virtual machines to enhance the protection of traditional containers. The project provides mechanisms to ensure compatibility of lightweight virtual machines with various container isolation infrastructures, container orchestration platforms and specifications such as OCI (Open Container Initiative), CRI (Container Runtime Interface) and CNI (Container Networking Interface). Tools are available for integration with Docker, Kubernetes, QEMU and OpenStack.

Integration with container management systems is achieved using a layer that simulates container management, which accesses the managing agent in the virtual machine through the gRPC interface and a special proxy. Inside the virtual environment, which is launched by the hypervisor, a specially optimized Linux kernel is used, containing only the minimum set of necessary capabilities.

As a hypervisor it is supported to use Dragonball Sandbox (container-optimized edition of KVM) with QEMU toolkit, as well as Firecracker and Cloud Hypervisor. The system environment includes an initialization daemon and an agent. The agent provides execution of user-defined container images in OCI format for Docker and CRI for Kubernetes. When used in conjunction with Docker, a separate virtual machine is created for each container, i.e. The environment running on top of the hypervisor is used for nested launch of containers.

To reduce memory consumption, a mechanism is used DAX (direct access to the file system bypassing the page cache without using the block device level), and technology is used to deduplicate identical memory areas KSM (Kernel Samepage Merging), which allows you to organize the sharing of host system resources and connect a common system environment template to different guest systems.

A file system is used to organize access to container images Nydus, which uses content addressing to effectively collaborate with generic images. Nydus supports on-the-fly loading of images (downloads only when needed), provides deduplication of duplicate data, and can use different backends for actual storage. POSIX compatibility is provided (similar to Composefs, the Nydus implementation combines the capabilities of OverlayFS with the EROFS or FUSE module).

In the new version:

  • The Dragonball virtual machine manager has added support for GPU hot plugging and the ability to use MTRR (Memory-Type Range Registers) registers to organize access to areas of physical memory.
  • runtime-rs, a runtime implementation in the Rust language, provides full processing of threads, pid and tid, and also reworks the qemu driver, which is used on systems with the s390 architecture (IBM Z).
  • The service for creating snapshots using the Nydus FS has been updated.
  • The container image management service has improved memory efficiency.
  • Enabled by default to mount the cgroups-v2 hierarchy at boot time using systemd.
  • Added the ability to define a timeout to limit the time it takes to obtain very large images in guest systems.
  • Added support for building the OPA agent (Open Policy Agent) for ppc64le and s390x architectures.

Thanks for reading: