CRI-O — Lightweight Container Runtime for Kubernetes
An OCI-compatible container runtime designed specifically for Kubernetes. CRI-O implements the Container Runtime Interface (CRI) with minimal footprint, providing a stable and secure alternative to Docker and containerd.
Instalación con revisión previa
Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.
npx -y tokrepo@latest install 8cc08d53-39d2-11f1-9bc6-00163e2b0d79 --target codexPrimero dry-run, confirma las escrituras y luego ejecuta este comando.
What it is
CRI-O is an OCI-compatible container runtime designed specifically for Kubernetes. It implements the Container Runtime Interface (CRI) with a minimal footprint, providing a stable and secure alternative to Docker and containerd for running pods. CRI-O does one thing well: it pulls images, creates containers, and manages their lifecycle for Kubernetes.
CRI-O targets platform engineers and cluster operators who want a purpose-built runtime without the extra features of Docker that Kubernetes does not use.
How it saves time or tokens
CRI-O has a smaller attack surface than Docker because it only implements what Kubernetes needs. No daemon, no build system, no swarm mode. Fewer moving parts mean fewer things to debug, patch, and monitor.
CRI-O versions are locked to Kubernetes versions (CRI-O 1.29 for Kubernetes 1.29), so compatibility is guaranteed and upgrade planning is straightforward.
How to use
- Install CRI-O from the package repository for your distribution
- Configure kubelet to use CRI-O as the container runtime
- Start the CRI-O service:
systemctl enable --now crio - Deploy Kubernetes with kubeadm or your preferred installer
Example
# Install CRI-O on Ubuntu/Debian
OS=xUbuntu_22.04
VERSION=1.29
curl -fsSL https://pkgs.k8s.io/addons:/cri-o:/stable:/v$VERSION/deb/Release.key |
gpg --dearmor -o /etc/apt/keyrings/cri-o-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/cri-o-apt-keyring.gpg] https://pkgs.k8s.io/addons:/cri-o:/stable:/v$VERSION/deb/ /" |
tee /etc/apt/sources.list.d/cri-o.list
apt-get update && apt-get install -y cri-o
systemctl enable --now crio
# Verify CRI-O is running
crictl info
Related on TokRepo
- DevOps tools -- Container and Kubernetes tools
- Security tools -- Container security and hardening
Common pitfalls
- CRI-O cannot build images; you need a separate tool like Buildah, Podman, or Kaniko for image builds
- CRI-O version must match your Kubernetes version; mixing versions causes incompatibilities
- Debugging is done with
crictlinstead ofdockercommands; operators need to learn the CRI CLI
Preguntas frecuentes
Both implement the Kubernetes CRI. containerd is more general-purpose and used outside Kubernetes (Docker uses it internally). CRI-O is purpose-built for Kubernetes only, with a smaller codebase and attack surface. Performance is comparable.
Yes. CRI-O pulls OCI-compliant images, which includes all Docker images. Any image that works with Docker or containerd works with CRI-O. There is no image format incompatibility.
No. CRI-O replaces Docker as the container runtime. Kubernetes communicates directly with CRI-O via the CRI socket. Having both installed can cause conflicts; remove Docker if switching to CRI-O.
Use crictl, the CRI command-line tool. Commands like 'crictl ps', 'crictl logs', and 'crictl inspect' mirror Docker commands but work directly with the CRI runtime.
Yes. CRI-O is the default container runtime for Red Hat OpenShift, one of the largest enterprise Kubernetes distributions. It is a CNCF incubating project with active development and production usage at scale.
Referencias (3)
- CRI-O GitHub— CRI-O implements the Kubernetes Container Runtime Interface
- Red Hat Docs— CRI-O is the default runtime for Red Hat OpenShift
- Kubernetes Docs— Kubernetes Container Runtime Interface specification
Relacionados en TokRepo
Discusión
Activos relacionados
Floci — AWS Local Emulator Alternative
A lightweight AWS service emulator for local development and testing, providing fast startup and low resource usage as an alternative to LocalStack.
Gluetun — Lightweight VPN Client Container
Gluetun is a thin Docker container that tunnels all traffic through a VPN provider, letting you route any container's network through a secure VPN connection.
DokuWiki — Simple Wiki That Stores Data in Plain Text Files
Lightweight wiki engine that requires no database. Uses plain text files for storage, making backups trivial and deployments simple. Ideal for documentation, knowledge bases, and internal team wikis.
NewPipe — Privacy-First YouTube Client for Android
A lightweight, free Android app that lets you watch YouTube without ads, tracking, or Google Play Services. Supports background playback, downloads, and subscriptions without an account.