Bitzu

KCNA ยท Containers and images

Container runtimes, OCI and CRI

OCI image/runtime specs, CRI, containerd, CRI-O, runc, how Kubernetes talks to a runtime.

Key points

  • Open Container Initiative (OCI) publishes the image spec and the runtime spec.
  • Runtime spec: how to run a container from a filesystem bundle and its config.
  • runc: low-level runtime implementing it.
  • Container Runtime Interface (CRI): gRPC API between the kubelet (client) and a node-level runtime (server).
  • containerd, CRI-O: manage images and containers, call a low-level runtime like runc.

Source: https://kubernetes.io/docs/concepts/architecture/cri/

Practice questions

Single choice

What is the Container Runtime Interface (CRI) used for?

  1. Communication between the kubelet and a container runtime
  2. Defining the image layer format
  3. Scheduling Pods onto nodes
  4. Storing cluster state
Show answer

Answer: A. Communication between the kubelet and a container runtime

CRI is the protocol (over gRPC) through which the kubelet drives a runtime, so Kubernetes is not tied to one runtime. It is not an image format or a scheduling API.

Select all that apply

Which of these are container runtimes that Kubernetes can use on a node?

  1. containerd
  2. CRI-O
  3. Mirantis Container Runtime
  4. etcd
  5. kube-proxy
Show answer

Answer: A. containerd, B. CRI-O, C. Mirantis Container Runtime

containerd, CRI-O and Mirantis Container Runtime are listed among the runtimes for Kubernetes. etcd stores cluster state and kube-proxy handles Service networking; neither runs containers.

True or false

True or false: the kubelet calls runc directly to start each container.

Show answer

Answer: False

False. The kubelet speaks CRI to a runtime such as containerd or CRI-O, and that runtime in turn invokes a low-level OCI runtime like runc.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More KCNA topics in this module