⎈ k8s knowledge compiler

Container Runtime Interface (CRI) [page]deterministic

concepts

The CRI is a plugin interface which enables the kubelet to use a wide variety of container runtimes, without having a need to recompile the cluster components.

You need a working [container runtime](#gloss:container-runtime) on each Node in your cluster, so that the [kubelet](#gloss:kubelet) can launch [Pods](#gloss:pod) and their containers.

[definition:cri]

## The API {#api}

The kubelet acts as a client when connecting to the container runtime via gRPC. The runtime and image service endpoints have to be available in the container runtime, which can be configured separately within the kubelet by using the `--container-runtime-endpoint` [command line flag](/docs/reference/command-line-tools-reference/kubelet/).

For Kubernetes v1.26 and later, the kubelet requires that the container runtime supports the `v1` CRI API. If a container runtime does not support the `v1` API, the kubelet will not register the node.

## Upgrading

When upgrading the Kubernetes version on a node, the kubelet restarts. If the container runtime does not support the `v1` CRI API, the kubelet will fail to register and report an error. If a gRPC re-dial is required because the container runtime has been upgraded, the runtime must support the `v1` CRI API for the connection to succeed. This might require a restart of the kubelet after the container runtime is correctly configured.

## List streaming {#list-streaming}

The standard CRI list RPCs (`ListContainers`, `ListPodSandbox`, `ListImages`) return all results in a single unary response. On nodes with a large number of containers (for example, more than roughly 10,000 including both running and stopped), these responses can exceed gRPC's default 16 MiB message size limit, causing the kubelet to fail when reconciling state with the container runtime.

With the `CRIListStreaming` feature gate enabled, the kubelet uses server-side streaming RPCs (such as `StreamContainers`, `StreamPodSandboxes`, `StreamImages`) that allow the container runtime to divide results across multiple response messages, bypassing the per-message size limit. This is particularly useful for:

  • High container churn environments (CI/CD systems)
  • Large-scale batch processing workloads

If the container runtime does not support streaming RPCs, the kubelet automatically falls back to the standard unary RPCs for backward compatibility.

##

  • Learn more about the CRI [protocol definition](https://github.com/kubernetes/cri-api/blob/v0.33.1/pkg/apis/runtime/v1/api.proto)

Sources

concepts/containers/cri.md · docContainer Runtime Interface (CRI)

Related (9)

references Container Runtimecontainer runtime conf=1
references Kubeletkubelet conf=1
references PodPods conf=1
part_of The API {#api}describes conf=1
part_of Upgradingdescribes conf=1
part_of List streaming {#list-streaming}describes conf=1
part_of {{% heading "whatsnext" %}}describes conf=1
api_for Containerdocuments API object conf=1

← all Docs