How to trust an insecure image registry?
Problem description
The image registry hosting platform component images may not provide HTTPS service or may not have a valid TLS certificate issued by a public certificate authority. If you trust this registry, configure your container runtime by following the steps below.
Configure trust for an insecure image registry
Notes:
- All nodes that need to use images, including newly added nodes, must be configured and have Containerd restarted.
- The configuration differs slightly between Containerd v1.4/v1.5 and v1.6. Follow the appropriate steps for your version.
-
Run the following on every node in the import cluster:
-
Back up the configuration file
-
Get the Containerd runtime version
-
-
Run the following on every node in the import cluster:
-
Edit
/etc/containerd/config.toml -
Restart Containerd.
-
-
Run the following on every node in the import cluster:
-
Check whether
config_pathexists in the config. -
Create the
hosts.tomlfile.If the previous command printed
Follow the steps in "Containerd v1.4 v1.5 configuration for insecure registries"., see Containerd v1.4 v1.5 configuration for insecure registries. -
Restart Containerd.
-