Persist Docker Registry Mirrors

Problem

We would like to use local registry-mirrors and if we add it to /etc/docker/daemon.json it will get overwritten after the restart pf9-kube. Is there way to persist it?

Environment

  • Platform9 Managed Kubernetes - All Versions

Procedure

Add the registry-mirrors information to the template /opt/pf9/pf9-kube/conf/daemon.json and replace the [your-registry-mirror] with endpoint of your registry.

"registry-mirrors": ["https://[your-registry-mirror]/"]

Restart the pf9-kube service.

$ sudo /etc/init.d/pf9-kube restart

Make sure the pf9-kube service is running.

$ sudo /etc/init.d/pf9-kube status

Validate the registry change in daemon.json file.

$ cat /etc/docker/daemon.json

Additional Information

This change will persist if there is reboot of node or restart of pf9-kube service, but will not be persistent across upgrades.

Last updated