You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.2 KiB

  1. # Kata Containers
  2. [Kata Containers](https://katacontainers.io) is a secure container runtime with lightweight virtual machines that supports multiple hypervisor solutions.
  3. ## Hypervisors
  4. _Qemu_ is the only hypervisor supported by Kubespray.
  5. ## Installation
  6. To use Kata Containers, set the following variables:
  7. **k8s_cluster.yml**:
  8. ```yaml
  9. container_manager: containerd
  10. kata_containers_enabled: true
  11. ```
  12. **etcd.yml**:
  13. ```yaml
  14. etcd_deployment_type: host
  15. ```
  16. ## Configuration
  17. ### Recommended : Pod Overhead
  18. [Pod Overhead](https://kubernetes.io/docs/concepts/configuration/pod-overhead/) is a feature for accounting for the resources consumed by the Runtime Class used by the Pod.
  19. 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.
  20. Pod Overhead is mandatory if you run Pods with Kata Containers that use [resources limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits).
  21. **Set cgroup driver**:
  22. To enable Pod Overhead feature you have to configure Kubelet with the appropriate cgroup driver, using the following configuration:
  23. `cgroupfs` works best:
  24. ```yaml
  25. kubelet_cgroup_driver: cgroupfs
  26. ```
  27. ... but when using `cgroups v2` (see <https://www.redhat.com/en/blog/world-domination-cgroups-rhel-8-welcome-cgroups-v2>) you can use systemd as well:
  28. ```yaml
  29. kubelet_cgroup_driver: systemd
  30. ```
  31. **Qemu hypervisor configuration**:
  32. The configuration for the Qemu hypervisor uses the following values:
  33. ```yaml
  34. kata_containers_qemu_overhead: true
  35. kata_containers_qemu_overhead_fixed_cpu: 10m
  36. kata_containers_qemu_overhead_fixed_memory: 290Mi
  37. ```
  38. ### Optional : Select Kata Containers version
  39. Optionally you can select the Kata Containers release version to be installed. The available releases are published in [GitHub](https://github.com/kata-containers/runtime/releases).
  40. ```yaml
  41. kata_containers_version: 2.2.2
  42. ```
  43. ### Optional : Debug
  44. Debug is disabled by default for all the components of Kata Containers. You can change this behaviour with the following configuration:
  45. ```yaml
  46. kata_containers_qemu_debug: 'false'
  47. ```