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.

90 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. [CRI-O]: https://cri-o.io/
  33. The following is a method to enable insecure registries.
  34. ```yaml
  35. crio_insecure_registries:
  36. - 10.0.0.2:5000
  37. ```
  38. And you can config authentication for these registries after `crio_insecure_registries`.
  39. ```yaml
  40. crio_registry_auth:
  41. - registry: 10.0.0.2:5000
  42. username: user
  43. password: pass
  44. ```
  45. ## Note about user namespaces
  46. CRI-O has support for user namespaces. This feature is optional and can be enabled by setting the following two variables.
  47. ```yaml
  48. crio_runtimes:
  49. - name: runc
  50. path: /usr/bin/runc
  51. type: oci
  52. root: /run/runc
  53. allowed_annotations:
  54. - "io.kubernetes.cri-o.userns-mode"
  55. crio_remap_enable: true
  56. ```
  57. The `allowed_annotations` configures `crio.conf` accordingly.
  58. The `crio_remap_enable` configures the `/etc/subuid` and `/etc/subgid` files to add an entry for the **containers** user.
  59. By default, 16M uids and gids are reserved for user namespaces (256 pods * 65536 uids/gids) at the end of the uid/gid space.
  60. ## Optional : NRI
  61. [Node Resource Interface](https://github.com/containerd/nri) (NRI) is disabled by default for the CRI-O. If you
  62. are using CRI-O version v1.26.0 or above, then you can enable it with the
  63. following configuration:
  64. ```yaml
  65. nri_enabled: true
  66. ```