In mainland China, pulling Docker images from docker.io faces restrictions, requiring the use of mirror registries. Users with Kubernetes clusters, like those in Aliyun, encounter issues without SSH access. A practical solution is to set up a mirror for containerd to maintain consistent configurations across environments. Creating a hosts.toml file at /etc/containerd/certs.d/docker.io enables this mirroring, allowing for adjustments to be made while keeping the Kubernetes config file unchanged. However, an inconsistency occurs where the config_path points to /etc/containerd/cert.d instead of certs.d.
When pulling Docker images from docker.io is blocked, using mirror registries becomes essential for users in mainland China, particularly with Aliyun Kubernetes clusters.
To prevent changing Kubernetes configuration files for different environments, utilizing a mirror for containerd to replace the docker.io source is a viable solution.
Creating a file at /etc/containerd/certs.d/docker.io/hosts.toml enables mirroring of docker.io, allowing configuration adjustments without altering Kubernetes configurations.
After the hosts.toml file is created, the config.toml reflects that the config_path points to /etc/containerd/cert.d, although the 's' in cert.d is missing.
Collection
[
|
...
]