crictl
CRI-compatible container runtime CLI
TLDR
SYNOPSIS
crictl [globaloptions] command [options] [arguments_]
DESCRIPTION
crictl is a command-line interface for CRI-compatible container runtimes. CRI (Container Runtime Interface) is the plugin interface that enables Kubernetes to work with different container runtimes. crictl provides debugging and inspection tools for Kubernetes nodes, interacting directly with containerd, CRI-O, or other CRI-compliant runtimes.Unlike docker or podman which are designed for general container management, crictl is specifically built for Kubernetes troubleshooting. It exposes the CRI API operations, allowing cluster administrators to inspect pod sandboxes, containers, and images as they exist in the CRI runtime layer, helping diagnose issues with pod scheduling, container creation, and image pulling.
PARAMETERS
-r, --runtime-endpoint endpoint
CRI runtime endpoint (e.g., unix:///run/containerd/containerd.sock).-i, --image-endpoint endpoint
CRI image endpoint.--timeout duration
Connection timeout in seconds (default: 2).--config path
Location of the client config file (default: /etc/crictl.yaml).-D, --debug
Enable debug output.
CONFIGURATION
~/.crictl.yaml or /etc/crictl.yaml
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 10
debug: false
COMMANDS
ps
List containerspods
List podsimages
List imagespull
Pull imagerun
Run a new containerexec
Execute command in containerlogs
View container logsattach
Attach to containerstart/stop
Start/stop containerrm
Remove containerrmi
Remove imagerunp/stopp/rmp
Run/stop/remove podinspect
Inspect containerinspecti
Inspect imageinspectp
Inspect podstats
Container resource usageinfo
Runtime info
CAVEATS
Must run with appropriate privileges (typically root). Command syntax differs from docker CLI. Primarily for debugging Kubernetes nodes, not general container management. Command-line flags take precedence over environment variables, which take precedence over the config file.
HISTORY
crictl is part of the cri-tools project maintained by Kubernetes SIGs. It was created to provide a standard debugging and troubleshooting tool for CRI-compatible container runtimes, replacing runtime-specific CLIs for Kubernetes node inspection.
