Forrest logo
back to the crictl tool

crictl:tldr:adb23

crictl: List all containers (Running and Exited).
$ crictl ps --all
try on your machine

The command "crictl ps --all" is used to list all the containers, including both running and stopped containers, in a Kubernetes cluster using the CRI (Container Runtime Interface) tool called "crictl".

Here's a breakdown of the command:

  • "crictl" is a command-line interface tool that interacts with the container runtime on a Kubernetes node using the CRI.
  • "ps" is the command within crictl used to list the containers. It stands for "Process Status" and is similar to the "ps" command in Linux.
  • "--all" is a flag that includes all containers in the listing, regardless of their status (running or stopped). By default, crictl only shows running containers, but using the "--all" flag, it includes all containers in the output.

So, running "crictl ps --all" would list all containers, both running and stopped, present in the Kubernetes cluster.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the crictl tool