Skip to content

Configure Containerd Private Repository

As Kubernetes is deprecating docker as container runtime after version 1.20, we decided to choose Containerd as our Kubernetes runtime. Our Kubernetes cluster is running on the Aliyun Cloud, with 3 master nodes and 6 worker nodes.

This post documented how to configure a private repository in Containerd. compared with Docker, I feel that client tools like crlctl is not powerful as the Docker client.

Configure private repository

To configure image registries create/modify the /etc/containerd/config.toml as follows

      bin_dir = "/opt/cni/bin"
      conf_dir = "/etc/cni/net.d"
      max_conf_num = 1

          endpoint = [""]

          endpoint = [""]
          username = "robot"
          password = "5UPu2MVzC"

The endpoint is a list that can contain multiple image registry URLs split by commas.
The auth is the credentials that login

Restart contained to take effect

systemctl restart containerd


perform the command to check the configuration.

crlctl info

Pull Image

image 2


You will be able to know how to configure a private in Containerd and how to use client – crictl to pull images or do other actions. for a heavily-docker user, the client crictl is not friendly, especially pulling images. no idea it is pulling or is stuck there for network connection reason or other reasons.

Leave a Reply