cri-tools
cri-tools provides command line utilities for debugging and validating Kubelet CRI interfaces, including crictl for CRI client operations and critest for validation test suites. It supports creating OCI images and interacting with container runtimes.
Description
cri-tools is a collection of tools designed for working with Container Runtime Interface (CRI) in Kubernetes environments. The package includes crictl, a CLI client for kubelet CRI, and critest, validation test suites for kubelet CRI. These tools are essential for debugging, managing, and testing container runtimes compatible with CRI standards.
crictl enables operators to attach to containers, create new ones, execute commands, checkpoint running containers, and stream events. It supports multiple container runtimes through configurable endpoints, making it versatile for different CRI implementations like containerd, CRI-O, and cri-dockerd.
critest provides comprehensive testing capabilities using the Ginkgo testing framework, allowing users to control test order, parallelism, filtering, failure handling, output formatting, and debugging. This makes it valuable for ensuring CRI runtime compliance and reliability in production Kubernetes clusters.
How It Works
cri-tools communicates with CRI-compatible container runtimes via Unix sockets (unix:///run/containerd/containerd.sock, unix:///run/crio/crio.sock, unix:///var/run/cri-dockerd.sock) using configurable endpoints. crictl acts as a client sending gRPC requests to the CRI runtime service for container lifecycle management and image operations. critest runs Ginkgo-based test suites that validate CRI conformance by executing container creation, execution, and teardown sequences against the runtime, with configurable parallelism and filtering for comprehensive coverage.
Installation
sudo apt install cri-toolsFlags
Examples
crictl -hcrictl attachcrictl execcrictl eventscrictl configcritest -hcrictl --runtime-endpoint unix:///run/containerd/containerd.sock