HiveBrain v1.2.0
Get Started
← Back to all entries
snippetdockerMinor

how to check running containers with containerd

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
withcontainerdrunninghowcontainerscheck

Problem

I've switched to containerd in a k8s cluster.

There's 2 pods running on one node, 2 github runners.

I used to check on a host what containers were running with "docker container ls" but how to check this when containerd is used?

sudo ctr container ls


comes back with nothing

Solution

I feel relevant and important to note that:

ctr c ls


lists all containers, i.e. either stopped or running.

In accordance with the question title: to precisely list all running containers (in the sense of docker terminology) you need to use this command:

ctr task list


or the shorthand

ctr t ls

Code Snippets

ctr task list

Context

StackExchange DevOps Q#16784, answer score: 1

Revisions (0)

No revisions yet.