Chapter 5. Release images
When you create a cluster on a provider by using Red Hat Advanced Cluster Management for Kubernetes, you must specify a release image to use for the new cluster. The release image specifies which version of Red Hat OpenShift Container Platform is used to build the cluster.
The files that reference the release images are yaml
files that are maintained in the acm-hive-openshift-releases
GitHub repository. Red Hat Advanced Cluster Management uses those files to create the list of the available release images in the console. This includes the latest fast channel images from OpenShift Container Platform. The console only displays the latest release images for the three latest versions of OpenShift Container Platform. For example, you might see the following release images displayed in the console options:
- quay.io/openshift-release-dev/ocp-release:4.6.23-x86_64
- quay.io/openshift-release-dev/ocp-release:4.7.4-x86_64
- quay.io/openshift-release-dev/ocp-release:4.8.0-x86_64
Additional release images are stored, but are not visible in the console. To view all of the available release images, run kubectl get clusterimageset
in your CLI. Only the latest versions are in the console to encourage the creation of clusters with the latest release images. In some cases, you might need to create a cluster that is a specific version, which is why the older versions are available. Red Hat Advanced Cluster Management uses those files to create the list of the available release images in the console. This includes the latest fast channel images from OpenShift Container Platform. The repository contains the clusterImageSets
directory and the subscription
directory, which are the directories that you use when working with the release images.
The repository contains the clusterImageSets
directory and the subscription
directory, which are the directories that you use when working with the release images.
The clusterImageSets
directory contains the following directories:
- Fast - Contains files that reference the latest versions of the release images for each OpenShift Container Platform version that is supported. The release images in this folder are tested, verified and supported.
- Releases - Contains files that reference all of the release images for each OpenShift Container Platform version (stable, fast, and candidate channels) Note: These releases have not all been tested and determined to be stable.
- Stable - Contains files that reference the latest two stable versions of the release images for each OpenShift Container Platform version that is supported. The release images in this folder are tested, verified and supported.
You can curate your own ClusterImageSets
in three ways:
The first step for any of the three ways is to disable the included subscription that performs the automatic update of the latest fast channel images. The automatic curation of the latest fast ClusterImageSets
can be disabled by using an installer parameter on the multiclusterhub resource. By toggling the spec.disableUpdateClusterImageSets
parameter between true
and false
, the subscription installed with Red Hat Advanced Cluster Management is disabled or enabled, respectively. If you want to curate your own images, set the spec.disableUpdateClusterImageSets
to true
to disable the subscription.
Option 1: Specify the image reference for the specific ClusterImageSet
that you want to use in the console when creating a cluster. Each new entry you specify persists and is available for all future cluster provisions. An example of an entry is: quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64
.
Option 2: Manually create and apply a ClusterImageSets
YAML file from the acm-hive-openshift-releases
GitHub repository.
Option 3: Follow the README.md
in the acm-hive-openshift-releases
GitHub repository to enable automatic updates of ClusterImageSets
from a forked GitHub repository.
The subscription
directory contains files that specify where the list of release images is pulled from. The default release images for Red Hat Advanced Cluster Management are provided in a Quay.io directory. The images are referenced by the files in the acm-hive-openshift-releases GitHub repository for version 2.3.
5.1. Synchronizing available release images
The release images are updated frequently, so you might want to synchronize the list of release images to ensure that you can select the latest available versions. The release images are available in the acm-hive-openshift-releases GitHub repository for version 2.3.
There are three levels of stability of the release images:
Category | Description |
stable | Fully tested images that are confirmed to install and build clusters correctly. |
fast | Partially tested, but likely less stable than a stable version. |
candidate | Not tested, but the most current image. Might have some bugs. |
Complete the following steps to refresh the list:
If the installer-managed
acm-hive-openshift-releases
subscription is enabled, disable the subscription by setting the value ofdisableUpdateClusterImageSets
totrue
. You can remove the subscription by entering a command that is similar to the following command:oc delete -f subscription/subscription-stable
- Clone the acm-hive-openshift-releases GitHub repository for version 2.3.
Connect to the stable release images and synchronize your Red Hat Advanced Cluster Management for Kubernetes hub cluster by entering the following command:
make subscribe-stable
Note: You can only run this
make
command when you are using the Linux or MacOS operating system.After about one minute, the latest list of
stable
release images is available.To synchronize and display the fast release images, enter the following command:
make subscribe-fast
Note: You can only run this
make
command when you are using the Linux or MacOS operating system.About one minute after running the command, the list of available
stable
andfast
release images updates with the currently available images.To synchronize and display the
candidate
release images, enter the following command:make subscribe-candidate
Note: You can only run this
make
command when you are using the Linux or MacOS operating system.About one minute after running the command, the list of available
stable
,fast
, andcandidate
release images updates with the currently available images.
- View the list of currently available release images in the Red Hat Advanced Cluster Management console when you are creating a cluster.
You can unsubscribe from any of these channels to stop viewing the updates by entering a command in the following format:
oc delete -f subscription/subscription-stable
5.1.1. Maintaining a custom list of release images when connected
You might want to ensure that you use the same release image for all of your clusters. To simplify, you can create your own custom list of release images that are available when creating a cluster. Complete the following steps to manage your available release images:
-
If the installer-managed
acm-hive-openshift-releases
subscription is enabled, disable it by setting the value ofdisableUpdateClusterImageSets
totrue
. - Fork the acm-hive-openshift-releases GitHub repository for version 2.3.
Update the
./subscribe/channel.yaml
file by changing thespec: pathname
to access your the GitHub name for your forked repository, instead ofstolostron
. This step specifies where the hub cluster retrieves the release images. Your updated content should look similar to the following example:spec: type: GitHub pathname: https://github.com/<forked_content>/acm-hive-openshift-releases.git
Replace
forked_content
with the path to your forked repository.- Add the YAML files for the images that you want available when you create a cluster by using the Red Hat Advanced Cluster Management for Kubernetes console to the ./clusterImageSets/stable/ or ./clusterImageSets/fast/* directory. *Tip: You can retrieve the available YAML files from the main repository by merging changes into your forked repository.
- Commit and merge your changes to your forked repository.
To synchronize your list of stable release images after you have cloned the
acm-hive-openshift-releases
repository, enter the following command to update the stable images:make subscribe-stable
Note: You can only run this
make
command when you are using the Linux or MacOS operating system.After running this command, the list of available stable release images updates with the currently available images in about one minute.
By default, only the stable images are listed. To synchronize and display the fast release images, enter the following command:
make subscribe-fast
Note: You can only run this
make
command when you are using the Linux or MacOS operating system.After running this command, the list of available fast release images updates with the currently available images in about 1 minute.
By default, Red Hat Advanced Cluster Management pre-loads a few ClusterImageSets. You can use the following commands to list what is available and remove the defaults.
oc get clusterImageSets oc delete clusterImageSet <clusterImageSet_NAME>
Note: If you have not disabled the installer-managed automatic updates of the
ClusterImageSets
by setting the value ofdisableUpdateClusterImageSets
totrue
, any images that you delete are recreated automatically.- View the list of currently available release images in the Red Hat Advanced Cluster Management console when you are creating a cluster.
5.1.2. Maintaining a custom list of release images while disconnected
In some cases, you need to maintain a custom list of release images when the hub cluster has no Internet connection. You can create your own custom list of release images that are available when creating a cluster. Complete the following steps to manage your available release images while disconnected:
- While you are on a connected system, navigate to the acm-hive-openshift-releases GitHub repository with the cluster image sets that are available for version 2.3.
-
Copy the
clusterImageSets
directory to a system that can access the disconnected Red Hat Advanced Cluster Management for Kubernetes hub cluster. -
Add the mapping between the managed cluster and the disconnected repository with your cluster image sets. See Configuring image registry repository mirroring for information about using your
ImageContentSourcePolicy
object to complete the mapping. -
Add the YAML files for the images that you want available when you create a cluster by using the Red Hat Advanced Cluster Management console by manually adding the
clusterImageSet
YAML content. Modify the
clusterImageSet
YAML files for the remaining OpenShift Container Platform release images to reference the correct offline repository where you store the images. Your updates should resemble the following example:apiVersion: hive.openshift.io/v1 kind: ClusterImageSet metadata: name: img4.4.0-rc.6-x86-64 spec: releaseImage: IMAGE_REGISTRY_IPADDRESS_or_DNSNAME/REPO_PATH/ocp-release:4.4.0-rc.6-x86_64
Ensure that the images are loaded in the offline image registry that is referenced in the YAML file.
Create each of the
clusterImageSets
by entering the following command for each YAML file:oc create -f <clusterImageSet_FILE>
Replace
clusterImageSet_FILE
with the name of the cluster image set file. For example:oc create -f img4.9.9-x86_64.yaml
After running this command for each resource you want to add, the list of available release images will be available.
- Alternately you can paste the image URL directly in the create cluster console in Red Hat Advanced Cluster Management. Adding the image URL creates new clusterImageSets if they do not exist.
- View the list of currently available release images in the Red Hat Advanced Cluster Management console when you are creating a cluster.