Kubernetes Container Runtime Concepts: Difference between revisions
Line 15: | Line 15: | ||
The Container Runtime Interface (CRI) is an abstraction layer that standardizes the way third-party container runtimes interface with Kubernetes. Irrespective of the container runtime in use, the regular Kubernetes commands and patterns apply. CRI exposes a clean documented interface for third-party container runtimes to plug in to. | The Container Runtime Interface (CRI) is an abstraction layer that standardizes the way third-party container runtimes interface with Kubernetes. Irrespective of the container runtime in use, the regular Kubernetes commands and patterns apply. CRI exposes a clean documented interface for third-party container runtimes to plug in to. | ||
Among other functions, CRI exposes container [[Metrics_in_Kubernetes#Resource_Metrics|resource metrics]] to the [[Kubelet#Metrics_Collection|kubelet]]. | Among other functions, CRI exposes container [[Metrics_in_Kubernetes#Resource_Metrics|resource metrics]] to the [[Kubelet#Metrics_Collection|kubelet]]. <font color=darkgray>TODO: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-container-stats.md</font> | ||
=Container Runtime= | =Container Runtime= |
Revision as of 01:12, 6 October 2020
External
- https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/
- https://kubernetes.io/docs/setup/production-environment/container-runtimes/
Internal
Container Runtime Interface (CRI)
The Container Runtime Interface (CRI) is an abstraction layer that standardizes the way third-party container runtimes interface with Kubernetes. Irrespective of the container runtime in use, the regular Kubernetes commands and patterns apply. CRI exposes a clean documented interface for third-party container runtimes to plug in to.
Among other functions, CRI exposes container resource metrics to the kubelet. TODO: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-container-stats.md
Container Runtime
Each Kubernetes node runs a container runtime, usually Docker. However, support for other container runtimes is available, via Container Runtime Interface (CRI). A container runtime performs container-related tasks such as pulling images and starting and stopping containers.
Available Container Runtimes
Docker
Kubernetes and Docker are complementary technologies. Docker is the technology that starts and stops containers under Kubernetes' supervision. Kubernetes is the higher-level technology that decides which nodes to run containers on, when to scale an application up or down or when to apply updates.
containerd
A container runtime that consists in a stripped-down version of Docker. More details:
cri-containerd
A community-based Open Source port of containerd.
CRI-O
Runtime Classes
Runtime classes is a feature that was introduced in Kubernetes 1.2. It allows for different classes of runtimes (gVisor, Kata Containers, etc).