Set Up Custom Image Registry
This article explains how to set up a custom image registry for installing or upgrading Release. A custom image registry can be either public (not password-protected) or private (password-protected).
The xl kube
command provides an option to choose between default, custom public, or private registry through the prompt Select type of image registry:
.
This guide covers setting up a custom image registry for Release installation. The steps are identical for both Release and Release runners, though the required images will differ.
Follow these steps to manually pull images to your registry.
Step 1: Get the Required Images
Ensure the following images are available in your custom registry repository for version 25.1.x:
For the latest image versions, either check the Release values.yaml file or use the xl kube images list
command.
Check the Latest Image Versions
By running the following command, you can check the list of latest image versions:
The xl kube images list command depends on the docker
command that needs to be installed on your system and also internet connection because it will pull operator images from docker.io registry.
xl kube images list --server-type release
This command excludes Release runner images and containerized plugins.
To list only the images required for your specific CR setup:
xl kube images list --server-type release --custom-resource "path_to_cr_file.yaml"
In the next sections, we will list the images required depending on the setup.
For Release
docker.io/xebialabs/xl-release:<version>
docker.io/library/busybox:stable
docker.io/xebialabs/release-operator:<version>
docker.io/xebialabs/xl-client:<version>
docker.io/bitnami/os-shell:<version>
docker.io/bitnami/kubectl:<version>
For Release Runner
docker.io/xebialabs/release-runner:<version>
For Nginx
docker.io/bitnami/nginx:<version>
docker.io/bitnami/nginx-ingress-controller:<version>
For HAProxy
quay.io/jcmoraisjr/haproxy-ingress:<version>
For Embedded PostgreSQL
docker.io/bitnami/postgresql:<version>
For Embedded RabbitMQ
docker.io/bitnami/rabbitmq:<version>
Step 2: Pull and Push the Images to Custom Image Registry
Before pushing a Docker image to a registry, ensure that you're logged into the Docker registry.
For example:
You can create a Docker registry called customrepo_host
to push the Docker image xl-release
to the repository customrepo
. To do so, run the following command:
docker pull docker.io/xebialabs/xl-release:<version>
docker tag docker.io/xebialabs/xl-release:<version> customrepo_host/customrepo/xl-release:<version>
docker push customrepo_host/customrepo/xl-release:<version>
Use the xl kube images pack
Command to Pull the Images
An easier way to pull all images to a remote location without direct access to docker.io is to use the xl kube images pack
command. This command saves all images to a tar file, which you can then transfer to the remote location and load there.
xl kube images pack --server-type release --package-file release-images.tar.gz
You can also use the --custom-resource
option to specify the CR file, so only the images required for your setup will be included in the tar file.
xl kube images pack --server-type release --custom-resource "path_to_cr_file.yaml" --package-file release-images.tar.gz
Transfer the release-images.tar.gz
file to the remote location and load it to the local Docker.
xl kube images unpack --input-package-file release-images.tar.gz
After that, tag and push the images to the custom registry as described above.
Custom Public Registry - Example
The following example lists the questions asked when you select a custom public registry:
? Select type of image registry: public [Custom Public Registry (Uses a specific custom registry)]
? Enter the custom docker image registry name (eg: <imageRegistryName> from <imageRegistryName>/<repositoryName>/<imageName>:<tagName>): customrepo_host
? Enter the repository name for the application and operator images (eg: <repositoryName> from <repositoryName>/<imageName>:<tagName>): customrepo
Custom Private Registry - Example
The following example lists the questions asked when you select a custom private registry:
? Select type of image registry: private [Custom Private Registry - Password protected (Uses a specific custom registry with password)]
? Enter the custom docker image registry name (eg: <imageRegistryName> from <imageRegistryName>/<repositoryName>/<imageName>:<tagName>): customrepo_host
? Provide the custom docker image registry secret: private-registry
? Enter the repository name for the application and operator images (eg: <repositoryName> from <repositoryName>/<imageName>:<tagName>): customrepo
It's mandatory to create a secret when you use a private image registry.
Run the following command:
kubectl create secret docker-registry regcred \
--docker-server=customrepo_host \
--docker-username=<reg-user> \
--docker-password=<reg-password> \
-n digitalai