- Notifications
You must be signed in to change notification settings - Fork1.1k
Open Container Initiative-based implementation of Kubernetes Container Runtime Interface
License
cri-o/cri-o
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Compatibility matrix: CRI-O ⬄ Kubernetes
- What is the scope of this project?
- What is not in the scope of this project?
- Roadmap
- CI images and jobs
- Commands
- Configuration
- Security
- OCI Hooks Support
- CRI-O Usage Transfer
- Communication
- Awesome CRI-O
- Getting started
- Adopters
- Weekly Meeting
- Governance
- License Scan
CRI-O follows the Kubernetes release cycles with respect to its minor versions(1.x.y
). Patch releases (1.x.z
) for Kubernetes are not in sync with those fromCRI-O, because they are scheduled for each month, whereas CRI-O providesthem only if necessary. If a Kubernetes release goesEnd ofLife,then the corresponding CRI-O version can be considered in the same way.
This means that CRI-O also follows the Kubernetesn-2
release version skewpolicy when it comes to feature graduation, deprecation or removal. This alsoapplies to features which are independent from Kubernetes. Nevertheless, featurebackports to supported release branches, which are independent from Kubernetesor other tools like cri-tools, are still possible. This allows CRI-O to decouplefrom the Kubernetes release cycle and have enough flexibility when it comes toimplement new features. Every feature to be backported will be a case by casedecision of the community while the overall compatibility matrix should not becompromised.
For more information visit theKubernetes Version SkewPolicy.
CRI-O | Kubernetes | Maintenance status |
---|---|---|
main branch | master branch | Features from the main Kubernetes repository are actively implemented |
release-1.x branch (v1.x.y ) | release-1.x branch (v1.x.z ) | Maintenance is manual, only bugfixes will be backported. |
The release notes for CRI-O are hand-crafted and can be continuously retrievedfromour GitHub pages website.
CRI-O is meant to provide an integration path between OCI conformant runtimes andthe Kubelet.Specifically, it implements the KubeletContainer Runtime Interface (CRI)using OCI conformant runtimes.The scope of CRI-O is tied to the scope of the CRI.
At a high level, we expect the scope of CRI-O to be restricted to the following functionalities:
- Support multiple image formats including the existing Docker image format
- Support for multiple means to download images including trust & image verification
- Container image management (managing image layers, overlay filesystems, etc)
- Container process lifecycle management
- Monitoring and logging required to satisfy the CRI
- Resource isolation as required by the CRI
- Building, signing and pushing images to various image storages
- A CLI utility for interacting with CRI-O. Any CLIs built as part of this projectare only meant for testing this project and there will be no guarantees on thebackward compatibility with it.
CRI-O is an implementation of the Kubernetes Container Runtime Interface (CRI)that will allow Kubernetes to directly launch and manageOpen Container Initiative (OCI) containers.
The plan is to use OCI projects and best of breed libraries for different aspects:
- Runtime:runc(or any OCI runtime-spec implementation) andoci runtime tools
- Images: Image management usingcontainers/image
- Storage: Storage and management of image layers usingcontainers/storage
- Networking: Networking support through the use ofCNI
It is currently in active development in the Kubernetes community through thedesign proposal.Questions and issues should be raised in the Kubernetessig-node Slack channel.
A roadmap that describes the direction of CRI-O can be foundhere.The project is tracking all ongoing efforts as part of theFeature RoadmapGitHub project.
CRI-O's CI is split-up between GitHub actions andOpenShift CI (Prow).Relevant virtual machine images used for the prow jobs are built periodically inthe jobs:
- periodic-ci-cri-o-cri-o-main-periodics-setup-periodic
- periodic-ci-cri-o-cri-o-main-periodics-setup-fedora-periodic
- periodic-ci-cri-o-cri-o-main-periodics-evented-pleg-periodic
The jobs are maintainedfrom the openshift/release repositoryand define workflows used for the particular jobs. The actual job definitionscan be found in the same repository underci-operator/jobs/cri-o/cri-o/cri-o-cri-o-main-presubmits.yamlfor themain
branch as well as the corresponding files for the releasebranches. The base image configuration for those jobs is available in the samerepository underci-operator/config/cri-o/cri-o.
Command | Description |
---|---|
crio(8) | OCI Kubernetes Container Runtime daemon |
Examples of commandline tools to interact with CRI-O(or other CRI compatible runtimes) areCrictlandPodman.
File | Description |
---|---|
crio.conf(5) | CRI-O Configuration file |
policy.json(5) | Signature Verification Policy File(s) |
registries.conf(5) | Registries Configuration file |
storage.conf(5) | Storage Configuration file |
The security process for reporting vulnerabilities is described inSECURITY.md.
You can configure CRI-O to injectOCI Hooks when creating containers.
We provideuseful information for operations and development transferas it relates to infrastructure that utilizes CRI-O.
For async communication and long running discussions please useissuesandpull requests on theGitHub repo.This will be the best place to discuss design and implementation.
For chat communication, we have achannel on the Kubernetes slackthat everyone is welcome to join and chat about development.
We maintain a curatedlist of links related to CRI-O. Did you findsomething interesting on the web about the project? Awesome, feel free to openup a PR and add it to the list.
To installCRI-O
, you can follow ourinstallation guide.Alternatively, if you'd rather buildCRI-O
from source, checkout oursetupguide.
Before you begin, you'll need tostart CRI-O
You can run a local version of Kubernetes withCRI-O
usinglocal-up-cluster.sh
:
- Clone theKubernetes repository
- From the Kubernetes project directory, run:
CGROUP_DRIVER=systemd \CONTAINER_RUNTIME=remote \CONTAINER_RUNTIME_ENDPOINT='unix:///var/run/crio/crio.sock' \./hack/local-up-cluster.sh
For more guidance in runningCRI-O
, visit ourtutorial page
CRI-O exposes per default thegRPC API to fulfill theContainer Runtime Interface (CRI) of Kubernetes. Besides this, there exists anadditional HTTP API to retrieve further runtime status information about CRI-O.Please be aware that this API is not considered to be stable and productionuse-cases should not rely on it.
On a running CRI-O instance, we can access the API via an HTTP transfer tool likecurl:
$sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info| jq{ "storage_driver": "btrfs", "storage_root": "/var/lib/containers/storage", "cgroup_driver": "systemd", "default_id_mappings": { ... }}
The following API entry points are currently supported:
Path | Content-Type | Description |
---|---|---|
/info | application/json | General information about the runtime, likestorage_driver andstorage_root . |
/containers/:id | application/json | Dedicated container information, likename ,pid andimage . |
/config | application/toml | The complete TOML configuration (defaults to/etc/crio/crio.conf ) used by CRI-O. |
/pause/:id | application/json | Pause a running container. |
/unpause/:id | application/json | Unpause a paused container. |
/debug/goroutines | text/plain | Print the goroutine stacks. |
/debug/heap | text/plain | Write the heap dump. |
The subcommandcrio status
can be used to access the API with a dedicated commandline tool. It supports all API endpoints via the dedicated subcommandsconfig
,info
andcontainers
, for example:
$sudo crio status infocgroup driver: systemdstorage driver: btrfsstorage root: /var/lib/containers/storagedefault GID mappings (format <container>:<host>:<size>): 0:0:4294967295default UID mappings (format <container>:<host>:<size>): 0:0:4294967295
Please refer to theCRI-O Metrics guide.
Please refer to theCRI-O Tracing guide.
Some aspects of the Container Runtime are worth some additional explanation.These details are summarized in adedicated guide.
Having an issue? There are some tips and tricks for debugging located inour debugging guide
An incomplete list of adopters of CRI-O in production environments can be foundhere.If you're a user, please help us complete it by submitting a pull-request!
A weekly meeting is held to discuss CRI-O development. It is open to everyone.The details to join the meeting are on thewiki.
For more information on how CRI-O is goverened, take a look at thegovernance file
About
Open Container Initiative-based implementation of Kubernetes Container Runtime Interface