⚠️ This is an automatically published staged repository for Kubernetes. Contributions, including issues and pull requests, should be made to the main Kubernetes repository: https://github.com/kubernetes/kubernetes. This repository is read-only for importing, and not used for direct contributions. See CONTRIBUTING.md for more details.
Purpose
This repository contains the definitions for the Container Runtime Interface (CRI).
CRI is a plugin interface which enables kubelet to use a wide variety of container runtimes,
without the need to recompile. CRI consists of a protocol buffers and gRPC API.
Read more about CRI API at kubernetes docs.
The CRI API is defined in kubernetes/kubernetes
repository and is only intended to be used for kubelet to container runtime
interactions, or for node-level troubleshooting using a tool such as crictl.
It is not a common purpose container runtime API for general use, and is intended
to be Kubernetes-centric. We try to avoid it, but there may be logic within a container
runtime that optimizes for the order or specific parameters of call(s) that the kubelet
makes.
CRI field affinity_cpus to WindowsContainerResources struct to support CPU affinity on Windows.
This field will be used by Windows CPU manager to set the logical processors to affinitize
for a particular container down to containerd/hcsshim.
Purpose
This repository contains the definitions for the Container Runtime Interface (CRI). CRI is a plugin interface which enables kubelet to use a wide variety of container runtimes, without the need to recompile. CRI consists of a protocol buffers and gRPC API. Read more about CRI API at kubernetes docs.
The repository kubernetes/cri-api is a mirror of https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/cri-api. Please do not file issues or submit PRs against the kubernetes/cri-api repository as it is readonly, all development is done in kubernetes/kubernetes.
The CRI API is defined in kubernetes/kubernetes repository and is only intended to be used for kubelet to container runtime interactions, or for node-level troubleshooting using a tool such as
crictl. It is not a common purpose container runtime API for general use, and is intended to be Kubernetes-centric. We try to avoid it, but there may be logic within a container runtime that optimizes for the order or specific parameters of call(s) that the kubelet makes.Version skew policy and feature development
Please read about:
Community, discussion, contribution, and support
Learn how to engage with the Kubernetes community on the community page.
You can reach the maintainers of this repository at:
Issues can be filed at https://github.com/kubernetes/kubernetes/issues. See CONTRIBUTING.md.
Code of Conduct
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.
Contribution Guidelines
See CONTRIBUTING.md for more information. Please note that kubernetes/cri-api is a readonly mirror repository, all development is done at kubernetes/kubernetes.
Change history
Here is the change history of the Container Runtime Interface protocol. The change history is maintained manually:
v1.35
git diff v1.34.0 1.35.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoNo changes
v1.34
git diff v1.33.0 v1.34.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protodebug_redactflags to the following fields ofAuthConfig:password,auth,identity_token,registry_token.v1.33
git diff v1.32.0 v1.33.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoClarify the behavior when the host_port value is set to 0 in CRI
[KEP-4639] Graduate image volume sources to beta
image_sub_pathto the typeMountto represent the subpath inside the image to mount.[FG:InPlacePodVerticalScaling] Add UpdatePodSandboxResources CRI method
UpdatePodSandboxResourcesto synchronously updates the PodSandboxConfig with the pod-level resource configuration.UpdatePodSandboxResourcesRequesttype to pass as an argument toUpdatePodSandboxResources.UpdatePodSandboxResourcesResponseempty type to return from theUpdatePodSandboxResources.Withdraw alpha support for HostNetwork containers on Windows
networkfield of the typeWindowsNamespaceOptionas HostNetwork containers are not supported.Surface Pressure Stall Information (PSI) metrics
iofield to the typesLinuxPodSandboxStatsandContainerStatsto represent the IO usage.psifield to the typeCpuUsage.IoUsage,PsiStats, andPsiDatato represent IO usage and PSI statistics.KEP 4960: Container Stop Signals
stop_signalto theContainerConfigtype.Signallisting all possible stop signals.v1.32
git diff v1.31.0 v1.32.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoaffinity_cpustoWindowsContainerResourcesstruct to support CPU affinity on Windows. This field will be used by Windows CPU manager to set the logical processors to affinitize for a particular container down to containerd/hcsshim.v1.31
git diff v1.30.0 v1.31.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoKEP-3619: Add NodeStatus.Features.SupplementalGroupsPolicy API and e2e
featuresfield to the typeStatusResponsefor the runtime to kubelet handshake on what features are supportedKEP-3619: Fine-grained SupplementalGroups control
supplemental_groups_policyfield to typesLinuxContainerSecurityContextandLinuxSandboxSecurityContextuserfield to the typeContainerStatusto represent actual user for the container[KEP-4639] Add OCI VolumeSource CRI API
imagefield to the typeMountto represent the OCI VolumeSourcev1.30
git diff v1.29.0 v1.30.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoRecursive Read-only (RRO) mounts
recursive_read_onlyfield to typeMountruntime_handlersfield to typeStatusResponseAdd user_namespaces field to RuntimeHandlerFeatures
user_namespacesfield to typeRuntimeHandlerFeaturesAdd image_id to CRI Container message
image_idfield to typeContainerAdd image_id to CRI ContainerStatus message
image_idfield to typeContainerStatusv1.29
git diff v1.28.0 v1.29.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoAdd runtime handler field to ImageSpec struct
runtime_handlerfield to typeImageSpecAdd container filesystem to the ImageFsInfoResponse
container_filesystemsfield to typeImageFsInfoResponsev1.28
git diff v1.27.0 v1.28.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protocri-api: fix comment lines about PROPAGATION_PRIVATE
Add user specified image to CRI ContainerConfig
user_specified_imagefield to typeImageSpeckubelet: get cgroup driver config from CRI
Add swap to stats to Summary API and Prometheus endpoints (/stats/summary and /metrics/resource)
SwapUsagetypeSwapUsagefield toContainerStatstypeExpose commit memory used in WindowsMemoryUsage struct
commit_memory_bytesfield to typeWindowsMemoryUsagev1.27
git diff v1.26.0 v1.27.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoCRI: Add CDI device info for containers
CDIDevicewas introduced and added to container configAdd mappings for volumes
Mountexpressing runtime UID/GID mappings for the mount.v1.26
git diff v1.25.0 v1.26.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoCRI: Add Windows Podsandbox Stats
WindowsPodSandboxStatsexpressing stats required to be collected from windows pods.Windows hostnetwork alpha
WindowsNamespaceOptionintroducedWindowsSandboxSecurityContexthas a new fieldnamespace_optionsof typeWindowsNamespaceOptionImprove the API description of
PodSecurityContext.SupplementalGroupsto clarify its unfamiliar behaviorSupplementalGroupsfield ofPodSecurityContextAdd Support for Evented PLEG
ContainerEventResponseupdated: the fieldpod_sandbox_metadataremoved and fieldspod_sandbox_statusandcontainers_statusesadded.PodSandboxStatusResponsehas a new fieldscontainers_statusesandtimestampv1.25
git diff v1.24.0 v1.25.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protokubelet: add CRI definitions for user namespaces
UserNamespaceintroduced to represent user namespaces id mappingNamespaceOptionhas a new fielduserns_optionsof typeUserNamespaceMinimal checkpointing support
CheckpointContainerintroduced with the corresponding request and response typesUpdate CRI API to support Evented PLEG
GetContainerEventsis introduced with the corresponding request and response typesCRI changes to support in-place pod resize
ContainerResourcesis introducedContainerStatushas a new fieldresourcesof typeContainerResourcesUpdateContainerResourcesupdated. The method must be implemented as synchronous and return error on failurev1.24
git diff v1.23.0 v1.24.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoUpdate CRI-API Capabilities to include a field that allows us to set ambient capabilities
Capabilityhas a new string fieldadd_ambient_capabilitiesCRI-API - Add rootfs size to WindowsContainerResources
WindowsContainerResourceshas a new int64 fieldrootfs_size_in_bytesv1.23
git diff v1.22.0 v1.23.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoCRI: add fields for pod level stats to satisfy the /stats/summary API
PodSandboxStats,ListPodSandboxStatswith the corresponding types of request and response objects are introducedpass sandbox resource requirements over CRI
LinuxPodSandboxConfig:overheadandresourcesof typeLinuxContainerResources.prevents garbage collection from removing pinned images
Imagehas a new boolean fieldpinnedv1.22
git diff v1.21.0 v1.22.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoWindows host process support
PodSandboxConfighaswindowsfield of typeWindowsPodSandboxConfigWindowsPodSandboxConfigintroducedWindowsSandboxSecurityContextintroducedWindowsContainerSecurityContexthas a newhost_processboolean fieldFeature: add unified on CRI to support cgroup v2
LinuxContainerResourceshas a new fieldunifiedwhich is a map of stringsAlpha node swap support
LinuxContainerResourceshas a newmemory_swap_limit_in_bytesint64 fieldv1.21
git diff v1.20.0 v1.21.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.protoNo changes
v1.20
git diff v1.19.0 v1.20.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto