crictl
crictl provides a CLI for CRI-compatible container runtimes. It is similiar to other container CLIs like Docker. It can be used to control the container runtime of k3s.
Usage
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 containermetricsp: List pod metrics. Metrics are unstructured key/value pairs gathered by CRI meant to replace cAdvisor’s /metrics/cadvisor endpoint.metricdescs: List metric descriptors. Returns information about the metrics available through the CRI.port-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 setcrictlclient configuration optionsstats: List container(s) resource usage statisticsstatsp: List pod(s) resource usage statisticscompletion: Output bash shell completion codecheckpoint: Checkpoint one or more running containersevents, event: Stream the events of containersupdate-runtime-configUpdate the runtime configurationhelp, h: Shows a list of commands or help for one command
crictl by default connects on Unix to:
unix:///run/containerd/containerd.sockorunix:///run/crio/crio.sockorunix:///var/run/cri-dockerd.sock