crictl
CRI-compatible container runtime CLI
TLDR
List containers
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-i, --image-endpoint endpoint
CRI image endpoint--timeout duration
Connection timeout-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. Different from docker CLI commands. Primarily for debugging Kubernetes nodes, not general container management.
