Hello,
I currently have a OneKE installation with one master and one worker.
I’m trying to add an insecure registry (skip tls verification) to be able to deploy images from a private container registry located in my network.
I tried to follow the RKE2 documentation to add insecure registries without result, adding the following:
to /etc/rancher/rke2/registries.yaml in each node and restarting rke2-server in the master node and rke2-agent in the worker node.
Other images from public registries are pulled correctly.
I’m able to pull images in my workstation by adding the registry to “insecure-registries” in /etc/docker/daemon.json
Versions of the related components and OS (frontend, hypervisors, VMs):
OneKE 1.27
Steps to reproduce:
Deploy image from insecure container registry
Current results:
Failed to pull image “<registry-url/image>”: rpc error: code = Unknown desc = failed to pull and unpack image “registry-url/image:latest”: failed to resolve reference “registry-url/image:latest”: failed to do request: Head “https://registry-url/v2/image/manifests/latest”: tls: failed to verify certificate: x509
Expected results:
Correct image pull from insecure registry.
In each worker node that is going to pull images from the registry copy /var/lib/rancher/rke2/agent/etc/containerd/config.toml as /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl and add the following: