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.

78 lines
2.1 KiB

  1. # CRI-O
  2. [CRI-O] is a lightweight container runtime for Kubernetes.
  3. Kubespray supports basic functionality for using CRI-O as the default container runtime in a cluster.
  4. * Kubernetes supports CRI-O on v1.11.1 or later.
  5. * etcd: configure either kubeadm managed etcd or host deployment
  6. _To use the CRI-O container runtime set the following variables:_
  7. ## all/all.yml
  8. ```yaml
  9. download_container: false
  10. skip_downloads: false
  11. etcd_deployment_type: host # optionally kubeadm
  12. ```
  13. ## k8s_cluster/k8s_cluster.yml
  14. ```yaml
  15. container_manager: crio
  16. ```
  17. ## all/crio.yml
  18. Enable docker hub registry mirrors
  19. ```yaml
  20. crio_registries:
  21. - prefix: docker.io
  22. insecure: false
  23. blocked: false
  24. location: registry-1.docker.io
  25. unqualified: false
  26. mirrors:
  27. - location: 192.168.100.100:5000
  28. insecure: true
  29. - location: mirror.gcr.io
  30. insecure: false
  31. ```
  32. ## Note about pids_limit
  33. For heavily mult-threaded workloads like databases, the default of 1024 for pids-limit is too low.
  34. This parameter controls not just the number of processes but also the amount of threads
  35. (since a thread is technically a process with shared memory). See [cri-o#1921]
  36. In order to increase the default `pids_limit` for cri-o based deployments you need to set the `crio_pids_limit`
  37. for your `k8s_cluster` ansible group or per node depending on the use case.
  38. ```yaml
  39. crio_pids_limit: 4096
  40. ```
  41. [CRI-O]: https://cri-o.io/
  42. [cri-o#1921]: https://github.com/cri-o/cri-o/issues/1921
  43. ## Note about user namespaces
  44. CRI-O has support for user namespaces. This feature is optional and can be enabled by setting the following two variables.
  45. ```yaml
  46. crio_runtimes:
  47. - name: runc
  48. path: /usr/bin/runc
  49. type: oci
  50. root: /run/runc
  51. allowed_annotations:
  52. - "io.kubernetes.cri-o.userns-mode"
  53. crio_remap_enable: true
  54. ```
  55. The `allowed_annotations` configures `crio.conf` accordingly.
  56. The `crio_remap_enable` configures the `/etc/subuid` and `/etc/subgid` files to add an entry for the **containers** user.
  57. By default, 16M uids and gids are reserved for user namespaces (256 pods * 65536 uids/gids) at the end of the uid/gid space.