Illumina Innovates with Rancher and Kubernetes
You might want to use a private Docker registry to share your custom base images within your organization. With a private registry, you can keep a private, consistent, and centralized source of truth for the Docker images that are used in your clusters.
A private registry is also used for air gap installations of Rancher, in which the registry is located somewhere accessible by Rancher. Then Rancher can provision clusters using images from the registry without direct access to the Internet.
This section describes how to configure a private Docker registry from the Rancher UI after Rancher is installed. For instructions on setting up a private registry with command line options during the installation of Rancher, refer to the single node or high-availability Rancher air gap installation instructions.
There are multiple ways to configure private registries in Rancher, depending on whether your private registry requires credentials:
If your private registry requires credentials, it cannot be used as the default registry. There is no global way to set up a private registry with authorization for every Rancher-provisioned cluster. Therefore, if you want a Rancher-provisioned cluster to pull images from a private registry with credentials, you will have to pass in the registry credentials through the advanced cluster options every time you create a new cluster.
Log into Rancher and configure the default admin password.
Go into the Settings view.
Look for the setting called system-default-registry and choose Edit.
system-default-registry
Change the value to your registry (e.g. registry.yourdomain.com:port). Do not prefix the registry with http:// or https://.
registry.yourdomain.com:port
http://
https://
Result: Rancher will use your private registry to pull system images.
You can follow these steps to configure a private registry when you provision a cluster with Rancher:
Result: The new cluster will be able to pull images from the private registry.