Container Runtime Interface (CRI) CLI
The Crictl utility is a tool for testing Kubernetes Container Runtime Interface (CRI) compliant daemons. The Crictl utility communicates using the CRI protocol to any daemon that provides the CRI interface. Currently
CRI-O
and containerd provide this. Traditionally, Crictl has been targeted for developer use cases, namely testing, validation, and debugging of container runtimes. But, the Crictl can also be a great tool for administrators trying to diagnose issues in your Kubernetes/CRI-O configuration. Crictl always reports what Kubernetes sees.
command
crictl [global options] command [command options] [arguments...]
COMMANDS:
attach
: Attach to a running containercreate
: Create a new containerexec
: Run a command in a running containerversion
: Display runtime version informationimages, image, img
: List imagesinspect
: Display the status of one or more containersinspecti
: Return the status of one or more imagesimagefsinfo
: Return image filesystem infoinspectp
: Display the status of one or more podslogs
: Fetch the logs of a containerport-forward
: Forward local port to a podps
: List containerspull
: Pull an image from a registryrun
: Run a new container inside a sandboxrunp
: Run a new podrm
: Remove one or more containersrmi
: Remove one or more imagesrmp
: Remove one or more podspods
: List podsstart
: Start one or more created containersinfo
: Display information of the container runtimestop
: Stop one or more running containersstopp
: Stop one or more running podsupdate
: Update one or more running containersconfig
: Get and set crictl client configuration optionsstats
: List container(s) resource usage statisticscompletion
: Output bash shell completion codehelp, h
: Shows a list of commands or help for one command
reference
https://cri-o.io/
https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md
https://kubernetes.io/zh/docs/tasks/debug-application-cluster/crictl/
https://cloud.redhat.com/blog/crictl-vs-podman
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here