@@ -225,23 +225,6 @@ version = 2
225225 # See the "CNI Config Template" section for more details.
226226 conf_template = " "
227227
228- # 'plugins."io.containerd.grpc.v1.cri".registry' contains config related to the registry
229- [plugins ."io .containerd .grpc .v1 .cri" .registry ]
230- # Specifies a directory to look for registry configs in.
231- # Dir can be used just like /etc/docker/certs.d OR can contain a hosts.toml with more specific configurations.
232- #
233- # NOTE: Specifying this will cause the cri plugin to ignore any other registry configs specified in this configuration file.
234- config_path = " /etc/containerd/certs.d"
235-
236- # 'plugins."io.containerd.grpc.v1.cri.registry.headers sets the http request headers to send for all registry requests
237- [plugins ."io .containerd .grpc .v1 .cri" .registry .headers ]
238- Foo = [" bar" ]
239-
240- # 'plugins."io.containerd.grpc.v1.cri".registry.mirrors' are namespace to mirror mapping for all namespaces.
241- [plugins ."io .containerd .grpc .v1 .cri" .registry .mirrors ]
242- [plugins ."io .containerd .grpc .v1 .cri" .registry .mirrors ."docker .io" ]
243- endpoint = [" https://registry-1.docker.io" , ]
244-
245228 # 'plugins."io.containerd.grpc.v1.cri".image_decryption' contains config related
246229 # to handling decryption of encrypted container images.
247230 [plugins ."io .containerd .grpc .v1 .cri" .image_decryption ]
@@ -263,6 +246,34 @@ version = 2
263246 # * Stream processors: https://github.com/containerd/containerd/blob/master/docs/stream_processors.md
264247 # * Containerd imgcrypt: https://github.com/containerd/imgcrypt
265248 key_model = " node"
249+
250+ # 'plugins."io.containerd.grpc.v1.cri".registry' contains config related to
251+ # the registry
252+ [plugins ."io .containerd .grpc .v1 .cri" .registry ]
253+ # config_path specifies a directory to look for the registry hosts configuration.
254+ #
255+ # The cri plugin will look for and use config_path/host-namespace/hosts.toml
256+ # configs if present OR load certificate files as laid out in the Docker/Moby
257+ # specific layout https://docs.docker.com/engine/security/certificates/
258+ #
259+ # If config_path is not provided defaults are used.
260+ #
261+ # *** registry.configs and registry.mirrors that were a part of containerd 1.4
262+ # are now DEPRECATED and will only be used if the config_path is not specified.
263+ config_path = " /etc/containerd/certs.d"
264+ ```
265+ Here is a simple example for a default registry hosts configuration when specifying config_path:
266+ ```
267+ $ tree /etc/containerd/certs.d
268+ /etc/containerd/certs.d
269+ └── docker.io
270+ └── hosts.toml
271+
272+ $ cat /etc/containerd/certs.d/docker.io/hosts.toml
273+ server = "https://docker.io"
274+
275+ [host."https://registry-1.docker.io"]
276+ capabilities = ["pull", "resolve"]
266277```
267278
268279## Untrusted Workload
0 commit comments