llm-wiki wiki · sources 2026-06-14

原文:raw/cri-tools-architecture-analysis.md · 仓库:https://github.com/kubernetes-sigs/cri-tools · 优先级 P0

一句话定位

CRI Tools 提供 crictl 和 critest,用于操作与验证 kubelet Container Runtime Interface。

核心架构图

┌────────────────────────────────────────────────────────────────────────────┐
│ Runtime debugging or validation need                                       │
│ Operators and CI need direct access to the CRI boundary.                   │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ cri-tools                                                                  │
│ crictl offers CLI inspection; critest validates CRI runtime behavior.      │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ CRI endpoint                                                               │
│ containerd, CRI-O, or another runtime exposes pods, containers, images,    │
│ logs, exec, and stats.                                                     │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Output                                                                     │
│ kubelet/runtime boundary diagnosis and conformance-style validation.       │
└────────────────────────────────────────────────────────────────────────────┘

模块分层

层 / 模块 职责
crictl inspect/run/exec/logs/images/pods
critest CRI conformance/validation
Runtime endpoint config Runtime endpoint config
Kubelet/runtime debugging workflow Kubelet/runtime debugging workflow

关键数据流

用户指定 CRI endpoint
        │
        ▼
crictl 调用 CRI gRPC
        │
        ▼
runtime 返回 pods/containers/images 状态
        │
        ▼
critest 执行 conformance cases
        │
        ▼
定位 kubelet/runtime 边界问题

设计决策与哲学