CRI-O is an im­ple­men­ta­tion of the Container Runtime Interface (CRI) for Ku­ber­netes, using “Open Container Ini­tia­tive” (OCI) images and runtime en­vi­ron­ments. The project was launched in 2016 by the company Red Hat and handed over to the “Cloud Native Computing Foun­da­tion” (CNCF) in spring 2019.

IONOS Cloud Managed Ku­ber­netes
Container workloads in expert hands

The ideal platform for demanding, highly scalable container ap­pli­ca­tions. Managed Ku­ber­netes works with many cloud-native solutions and includes 24/7 expert support.

How does CRI-O work?

To un­der­stand how CRI-O works and how it interacts with related tech­nolo­gies, it is worth looking at the his­tor­i­cal de­vel­op­ment of container-based vir­tu­al­iza­tion. The basis for its creation was the Docker software which made the vir­tu­al­iza­tion of in­di­vid­ual apps based on light­weight con­tain­ers main­stream. Be­fore­hand, vir­tu­al­iza­tion was primarily un­der­stood as the use of virtual machines. A virtual machine contains an entire operating system, whereas several con­tain­ers access a shared operating system kernel.

From Docker to Ku­ber­netes to CRI-O

A container usually contains a single app which often provides a micro-service. In practical use, several con­tain­ers are usually con­trolled together to implement an ap­pli­ca­tion. The co­or­di­nat­ed man­age­ment of entire groups of con­tain­ers is known as or­ches­tra­tion.

Even if or­ches­tra­tion with Docker and tools like Docker Swarm is feasible, Ku­ber­netes has prevailed as an al­ter­na­tive to Docker. Ku­ber­netes combines several con­tain­ers in a so-called pod. The pods in turn run on so-called nodes – these can be both physical and virtual machines.

One of the main problems with Docker was its mono­lith­ic ar­chi­tec­ture. The Docker daemon ran with root rights and was re­spon­si­ble for a multitude of different tasks: from down­load­ing the container images to executing them in the runtime en­vi­ron­ment to creating new images. This merging of in­de­pen­dent areas violates the software de­vel­op­ment principle “Sep­a­ra­tion of concerns” and leads to security issues in practice. Therefore, efforts were made to decouple the in­di­vid­ual com­po­nents.

When Ku­ber­netes was released, the Ku­ber­netes daemon kubelet contained a hard-coded Docker runtime en­vi­ron­ment. However, the need to support other runtimes soon became apparent. Mod­u­lar­iza­tion of the in­di­vid­ual aspects promised a sim­pli­fied de­vel­op­ment and higher security. To make various runtimes com­pat­i­ble with Ku­ber­netes, an interface was defined: the Container Runtime Interface (CRI). CRI-O is a specific im­ple­men­ta­tion of this interface.

Note

Make use of Ku­ber­netes today – with Managed Ku­ber­netes from IONOS.

Ar­chi­tec­ture and function of CRI-O

The following com­po­nents are part of CRI-O:

  • The software library con­tain­ers/image to download container images from various online sources.
  • The software library con­tain­ers/storage to manage container layers and create the file system for container pods.
  • An OCI-com­pat­i­ble runtime to run the container; the standard runtime is runC, but other OCI-com­pat­i­ble runtimes like Kata Con­tain­ers can be used.
  • The container net­work­ing interface (CNI) used to create the network for a pod; plugins for Flannel, Weave and OpenShift-SDN are used.
  • The container mon­i­tor­ing tool conmon to con­tin­u­ous­ly monitor the container.

CRI-O is often used in con­junc­tion with the pod man­age­ment tool Podman. This works because Podman relies on the same libraries for down­load­ing the container images and managing the container layers as CRI-O.

In principle, using CRI-O consists of the following steps:

  1. Download an OCI container image
  2. Extract the image into an OCI runtime file system bundle
  3. Execution of the container by an OCI runtime

When is CRI-O being used?

Currently, CRI-O is primarily used as part of Red Hat’s OpenShift product line. OpenShift im­ple­men­ta­tions exist for cloud platforms from all major providers. Fur­ther­more, the software can be operated as part of the OpenShift Container Platform in public or private data centers. Here is an overview of the various OpenShift products:

Product InĀ­fraĀ­strucĀ­ture Managed by Supported by
Red Hat OpenShift Dedicated AWS, Google Cloud Red Hat Red Hat
Microsoft Azure Red Hat OpenShift Microsoft Azure Red Hat and Microsoft Red Hat and Microsoft
Amazon Red Hat OpenShift AWS Red Hat and AWS Red Hat and AWS
Red Hat OpenShift on IBM Cloud IBM Cloud IBM Red Hat and IBM
Red Hat OpenShift Online Red Hat Red Hat Red Hat
Red Hat OpenShift Container Platform Private Cloud, Public Cloud, Physical machine, virtual machine, Edge Kunde Red Hat, others
Red Hat OpenShift KuĀ­berĀ­netes Engine Private Cloud, Public Cloud, Physical machine, virtual machine, Edge Kunde Red Hat, others

What dif­fer­en­ti­ates CRI-O from other Runtimes?

CRI-O is a rel­a­tive­ly new de­vel­op­ment in container vir­tu­al­iza­tion. His­tor­i­cal­ly, there are several al­ter­na­tive container runtimes. Perhaps the most unique selling point of CRI-O is its singular focus on Ku­ber­netes as the en­vi­ron­ment. With CRI-O, Ku­ber­netes can execute con­tain­ers directly without ad­di­tion­al tools or special code ad­just­ments. CRI-O directly supports the existing, OCI-com­pat­i­ble runtimes. Here is an overview of actively developed and fre­quent­ly used runtimes:

Runtime Type DeĀ­scripĀ­tion
runC Low-level OCI Runtime De facto standard runtime that emerged from Docker and is written in Go
crun Low-level OCI Runtime High-perĀ­forĀ­mance runtime; imĀ­pleĀ­mentĀ­ed in C instead of Go
Kata ConĀ­tainĀ­ers VirĀ­tuĀ­alĀ­ized OCI Runtime Uses light-weight virtual machine (VM)
conĀ­tainĀ­erd High-level CRI Runtime Uses standard runC
CRI-O Light-weight CRI Runtime Can use runC, crun, Kata ConĀ­tainĀ­ers, among others
Go to Main Menu