study.

Inspect Images in Their Namespace · containerd

If an image seems missing, first check which namespace you queried.

← containerd

Learn with progress and quizzes

First, understand the concepts.

Metadata scope

A containerd namespace separates client metadata. It is not a Kubernetes namespace or a Linux network namespace.

Image references

Use a fully qualified reference such as docker.io/library/busybox:1.36 with ctr. Tags can change; record digests when reproducibility matters.

Isolation limits

Namespaces are not a security boundary. Administrative socket access can reach other namespaces; do not use production k8s.io objects for these experiments.

Why it matters

A namespace scopes image references and metadata. It does not automatically correspond to a Kubernetes namespace with a similar name.

Work through the reasoning

Record the query scope

Record socket, namespace, and image reference together. If another namespace has an empty list, align query scope first. Sharing a host does not imply using the same namespace.

Separate references from content

Names and tags are metadata references; digests identify content. A tag can later point to different content, so record digests when reproducibility matters.

Learn by doing.

Use a personal Linux practice VM with containerd, runc, ctr, and sudo access. The nerdctl lab also needs nerdctl; the CRI lab needs crictl and a practice node with CRI enabled. Examples assume /run/containerd/containerd.sock; check the actual socket in other environments.

Create the practice namespace study-ctr-images, pull BusyBox, and print a message. If that name already exists, confirm it belongs to your previous practice run first.

sudo ctr namespaces create study-ctr-images
sudo ctr --namespace study-ctr-images images pull docker.io/library/busybox:1.36
sudo ctr --namespace study-ctr-images images ls
sudo ctr --namespace study-ctr-images run --rm docker.io/library/busybox:1.36 study-hello /bin/echo runtime-ok < /dev/null

How to check your result

Find BusyBox in the namespace’s image list and runtime-ok in the output. Before pulling a seemingly missing image again, compare the namespace and socket being used.

Clean up practice resources

Run after checking the result. Confirm these resources belong to your practice run and contain no data you need to keep.

sudo ctr --namespace study-ctr-images images rm --sync docker.io/library/busybox:1.36
sudo ctr namespaces remove study-ctr-images

Apply what you learned

The default ctr image list is empty, while k8s.io lists images. What can you explain before downloading again?

Reveal the reasoning after trying

The commands observed different metadata scopes. Distinguish Kubernetes and practice namespaces and confirm the socket. Do not treat production k8s.io images as lab cleanup targets.

Ready to check your understanding?

What is a containerd namespace?

  1. Exactly the same object as a Kubernetes namespace
  2. A security boundary even administrators cannot cross
  3. A scope for metadata
  4. A container TCP port
Reveal the reasoning after trying

A scope for metadata

Namespaces scope metadata; they do not replace security isolation and are distinct from Kubernetes namespaces.

Official documentation · Inspect Images in Their Namespace