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
What is the Container Runtime Interface (CRI) used for?
- Communication between the kubelet and a container runtime
- Defining the image layer format
- Scheduling Pods onto nodes
- 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.
Which of these are container runtimes that Kubernetes can use on a node?
- containerd
- CRI-O
- Mirantis Container Runtime
- etcd
- 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: 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.
