c12s-kubespray/docs/kata-containers.md
Pasquale Toscano 8f5c4dcd2e
Add support for Kata Containers (#6256)
* Install Kata Containers as additional container runtime

* Create RuntimeClasses for Kata Containers

* Updated Vagrant to optionally run without Docker as container manager

* Updated Vagrant to optionally use Libvirt nested virtualization

* Add Kata Containers documentation

* Fix lint errors

* Add kata_containers_enabled to kubespray-defaults

* Fixed typo error

* Fixed typo error
2020-06-22 00:28:39 -07:00

2 KiB

Kata Containers

Kata Containers is a secure container runtime with lightweight virtual machines that supports multiple hypervisor solutions.

Hypervisors

Qemu is the only hypervisor supported by Kubespray.

Installation

To use Kata Containers, set the following variables:

k8s-cluster.yml:

container_manager: containerd
kata_containers_enabled: true

etcd.yml:

etcd_deployment_type: host

Configuration

Pod Overhead is a feature for accounting for the resources consumed by the Runtime Class used by the Pod.

When this feature is enabled, Kubernetes will count the fixed amount of CPU and memory set in the configuration as used by the virtual machine and not by the containers running in the Pod.

Pod Overhead is mandatory if you run Pods with Kata Containers that use resources limits.

Set cgroup driver:

To enable Pod Overhead feature you have to configure Kubelet with the appropiate cgroup driver, using the following configuration:

kubelet_cgroup_driver: cgroupfs

Qemu hypervisor configuration:

The configuration for the Qemu hypervisor uses the following values:

kata_containers_qemu_overhead: true
kata_containers_qemu_overhead_fixed_cpu: 10m
kata_containers_qemu_overhead_fixed_memory: 290Mi

Optional : Select Kata Containers version

Optionally you can select the Kata Containers release version to be installed. The available releases are published in GitHub.

kata_containers_version: 1.11.1

Optional : Debug

Debug is disabled by default for all the components of Kata Containers. You can change this behaviour with the following configuration:

kata_containers_qemu_debug: 'false'