Systems and protocols · Intermediate

Kubernetes CRI: separating kubelet and runtime responsibilities

Trace Pod preparation and container startup to separate CRI, OCI, networking and application failures.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. An interface between node components
  2. Image operations and runtime operations
  3. Sandboxes and individual containers
  4. CRI and OCI occupy different boundaries
  5. Startup and readiness are separate results
  6. Ask Logeia about this articleCheck your understanding

An interface between node components

On a Kubernetes node, the kubelet asks a container runtime to carry out operations needed for a Pod. CRI defines the interface between those components. Agreeing on request and response contracts allows implementations to interoperate without embedding every runtime detail inside the kubelet. The interface is a boundary between responsibilities, not the entirety of the node execution machinery.

CRI itself is not a standalone program that executes containers. A runtime such as containerd can implement the interface and use another lower-level runtime for process execution. Distinguish creation of a Pod resource, kubelet reconciliation and actual runtime operations. When an operation fails, these distinctions identify the component that can provide useful evidence rather than blaming the whole cluster.

Image operations and runtime operations

CRI separates image-related operations from operations concerning sandboxes and containers. If image retrieval fails, investigate registry reachability, authentication and the image reference. When retrieval has already succeeded, assuming another registry failure does not explain a later process-creation configuration error. Track the last successful operation rather than treating every unsuccessful Pod as the same incident.

For example, successful retrieval followed by a failed start establishes only that the retrieval stage completed. Command paths, working directories, mounts and execution credentials need evidence from the later stage. A useful incident timeline records the requested operation, the component returning the result and the resulting state. That timeline is more informative than repeatedly deleting the Pod without retaining the original failure details.

Sandboxes and individual containers

A Pod sandbox and the individual containers associated with it are distinct operation and state concepts. In a Pod with two application containers, successful startup of one does not establish successful startup of the other. Determine whether the problem belongs to shared environment preparation or to a particular command and its configuration. Those hypotheses need different evidence.

Sandbox preparation can involve networking, but the concrete integration depends on the runtime and network configuration. The existence of a CRI operation does not establish correct routing, name resolution or policy enforcement across every destination. Record prepared environment, started processes and demonstrated connectivity as separate observations. A network symptom should be investigated at the component responsible for the relevant stage, with the actual configuration in view.

CRI and OCI occupy different boundaries

OCI runtime specifications describe execution configuration and container lifecycle contracts. CRI describes communication between kubelet and a container runtime. A runtime can expose CRI while using an OCI-compatible lower-level execution component internally. Both terms can therefore apply to one deployment without referring to interchangeable interfaces or identical responsibilities.

An error returned through CRI may originate in lower-level execution configuration. Conversely, independently launching a process through a lower-level tool does not demonstrate that kubelet can reach the configured runtime endpoint or use its required API. Investigate endpoint connectivity, API compatibility and execution configuration in order. Each check narrows a distinct boundary and avoids drawing a broad compatibility conclusion from one successful low-level demonstration.

Startup and readiness are separate results

A runtime reporting a started container does not prove that the application can handle user requests. Initialization may include loading settings, waiting for a database or preparing data. Readiness checks and runtime execution state answer different questions. An application can be running while it remains unsuitable for receiving traffic.

Correlate Pod events, individual container state, runtime logs and application logs using their times and identifiers. Restart count alone is not a diagnosis, and successful process startup is not evidence that a business operation committed. When investigating endpoints or authentication, retain enough context to locate the failure without dumping secret values into shared logs. Effective operation requires both clear component contracts and application-level checks.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 24

Choose a learning path