Connectivity Link in disconnected environments
You can do many tasks on isolated clusters when you use Connectivity Link as a disconnected gateway. For example, securely route traffic, limit request rates, and handle automatic failover. You can also manage internal network policies, security rules, and automate TLS certificates.
Install Connectivity Link Operators in disconnected OpenShift Container Platform environments by mirroring the Operator catalog and images to your internal registry. Use the oc-mirror tool to perform the following actions, in order:
-
Mirror the Red Hat Operator catalog containing the Connectivity Link Operator package to your local registry.
-
Configure your OpenShift Container Platform cluster to use the mirrored catalog.
-
Install the Connectivity Link Operator using Operator Lifecycle Manager (OLM).
Mirror the Connectivity Link Operator catalog
To begin your disconnected Connectivity Link installation, you must mirror the Red Hat Operator catalog to your disconnected environment. By mirroring, you are making a complete local copy of Connectivity Link on a private container registry that your isolated cluster can reach.
|
Note
|
Applying |
If you want to use the Connectivity Link Red Hat Developer Hub plugin in your disconnected environment, you must also mirror the OCI images.
|
Important
|
With Connectivity Link on OpenShift Container Platform 4.19 and newer, you can configure the OpenShift |
-
You have a supported-version, disconnected OpenShift Container Platform cluster.
-
You configured a mirror registry.
-
You have access to
registry.redhat.ioon an internet-connected workstation. -
You have credentials for your mirror registry configured in
${HOME}/.docker/config.json. -
You have either an
ImageDigestMirrorSetorImageTagMirrorSetobject configured for platform images. -
You installed the
oc-mirrorCLI tool for mirroring operator catalogs.
-
On your internet-connected workstation, create an
ImageSetConfigurationfile namedrhcl-imageset-config.yamlby using the following example:ExampleImageSetConfigurationYAMLapiVersion: mirror.openshift.io/v2alpha1 kind: ImageSetConfiguration mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.22 packages: - name: rhcl-operator - name: authorino-operator - name: limitador-operator - name: dns-operator additionalImages: - name: registry.redhat.io/rhcl-1/coredns-rhel9:<vX.Y.Z>-
In the
mirror.operators.catalogparameter, specify the Red Hat Operator catalog version matching your OpenShift Container Platform cluster version. -
Optional. The value of the
mirror.additionalImages.nameparameter is thedns-operatorOperator version. Set this value if you want to use the Core DNS Operator. ReplacevX.Y.Zwith the version matching the Connectivity Link Operator release.
-
-
Mirror the catalog to a local directory by running the following command:
$ oc mirror --v2 --config rhcl-imageset-config.yaml file://./rhcl-mirrorThis command downloads the catalog and Operator images to the
rhcl-mirrordirectory. -
Transfer the
rhcl-mirrordirectory to your disconnected environment using removable media. -
On a host in the disconnected environment that has access to your mirror registry, push the images to the registry by running the following command:
$ oc mirror --v2 --config rhcl-imageset-config.yaml \ --from file://./rhcl-mirror \ docker://<mirror_registry:port>Replace
<mirror_registry:port>with the path and port to your mirror registry. -
Apply either or both the
ImageDigestMirrorSetandImageTagMirrorSetfiles to configure the cluster to use the mirrored images by running the following commands:-
Apply the
ImageDigestMirrorSetby running the following command:$ oc apply -f results-*/cluster-resources/idms-oc-mirror.yaml -
Apply the
ImageTagMirrorSetby running the following command:$ oc apply -f results-*/cluster-resources/itms-oc-mirror.yamlNoteThe
oc-mirror toolgenerates these manifests based on how you reference your images in the mirrored Operators.
-
-
Wait for the
MachineConfigPoolobject to update by running the following command:$ oc wait mcp --all --for=condition=Updated --timeout=30mExample outputmachineconfigpool.machineconfiguration.openshift.io/master condition met machineconfigpool.machineconfiguration.openshift.io/worker condition met -
From your disconnected cluster, apply the generated
CatalogSourcemanifest by running the following command:$ oc apply -f cluster-resources/<cs-redhat-operator-index-v4-21.yaml>Replace
<cs-redhat-operator-index-v4-21.yaml>with the manifest filename. -
Wait for the Operator catalog to be ready by running the following command:
$ oc wait catalogsource -n openshift-marketplace --all --for=condition=Ready --timeout=5mExample outputcatalogsource.operators.coreos.com/cs-redhat-operator-index-v4-21 condition met
Install Connectivity Link on OpenShift Container Platform from the CLI
You can install Connectivity Link with OpenShift CLI (oc) using the OpenShift Container Platform Cluster Ingress Operator as the default Gateway object controller. You must complete these steps on each OpenShift Container Platform cluster that you want to use Connectivity Link on.
|
Warning
|
Connectivity Link uses labels formatted as |
-
You are logged into OpenShift Container Platform as a cluster administrator.
-
You are using a supported configuration of OpenShift Container Platform and required components.
-
You installed the OpenShift CLI (
oc).
-
Create the namespace where you want to install Connectivity Link by running the following command:
$ oc create ns <kuadrant_system>You can replace the default
<kuadrant_system>with the namespace you want to use. -
Create the
Subscriptioncustom resource (CR) by using the following example:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: rhcl-operator namespace: <kuadrant_system> spec: channel: stable installPlanApproval: Automatic name: rhcl-operator source: redhat-operators sourceNamespace: openshift-marketplaceReplace
<kuadrant_system>with the namespace you created to install Connectivity Link.ImportantFor disconnected installations, you must replace the
spec.sourceparameter value of theSubscriptionobject with the name of theCatalogSourceobject created byoc-mirror. You can find the catalog source name by running the following command:$ oc get catalogsource -n openshift-marketplace -
Apply the
SubscriptionCR by running the following command:$ oc apply -f subscription.yaml -
Create the
OperatorGroupCR by using the following example:apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: kuadrant namespace: <kuadrant_system> spec: upgradeStrategy: DefaultReplace
<kuadrant_system>with the namespace where you are installing Connectivity Link. -
Apply the
OperatorGroupCR by running the following command:$ oc apply -f operatorgroup.yaml -
Confirm that the Connectivity Link installation has finished by running one of the following commands:
$ oc wait --for=jsonpath={.status.installPlanRef.name} subscription rhcl-operator --timeout=10s ip=$(oc get subscription rhcl-operator -o=jsonpath={.status.installPlanRef.name})$ oc wait --for=condition=Installed installplan ${ip} --timeout=60sExpect the status of
installplan.operators.coreos.com/install-<suffix>when Connectivity Link is ready. The name of the install plan has a random suffix, for example,4rql7. -
Create your Connectivity Link CR by using the following example:
apiVersion: kuadrant.io/v1beta1 kind: Kuadrant metadata: name: kuadrant namespace: <kuadrant_system> spec: {}Replace
<kuadrant_system>with the namespace where you installed Connectivity Link. -
Optional. If you have a Red Hat Developer Hub subscription, enable the Red Hat Developer Hub plugin by using the following example:
apiVersion: kuadrant.io/v1beta1 kind: Kuadrant metadata: #... spec: components: developerPortal: enabled: true #... -
Apply the Connectivity Link CR by running the following command:
$ oc apply -f kuadrant.yaml
-
Check the status of the Connectivity Link CR generation by running the following command:
$ oc wait kuadrant/kuadrant --for="condition=Ready=true" -n <kuadrant_system> --timeout=300sReplace
<kuadrant_system>with the namespace where you installed Connectivity Link.Example outputkuadrant.kuadrant.io/kuadrant Ready -
Verify that all component Operator pods are running by entering the following command:
$ oc get pods -n <kuadrant_system>Replace
<kuadrant_system>with the namespace where you installed Connectivity Link.Example outputNAME READY STATUS RESTARTS AGE authorino-operator-controller-manager-<hash> 2/2 Running 0 5m dns-operator-controller-manager-<hash> 2/2 Running 0 5m kuadrant-operator-controller-manager-<hash> 2/2 Running 0 7m limitador-operator-controller-manager-<hash> 2/2 Running 0 5m -
For a disconnected installation, verify that there are no image pull errors by running the following command:
$ oc get events -n <kuadrant_system> --field-selector reason=FailedReplace
<kuadrant_system>with the namespace where you installed Connectivity Link.The output should not show image pull failures.
NotePod specifications still show original the image references, for example,
registry.redhat.io/redhat/…, even when images are pulled from your mirror registry. The redirection happens transparently at the CRI-O level throughImageDigestMirrorSetorImageTagMirrorSetconfiguration objects.
Troubleshoot a catalog image not accessible
If your CatalogSource object shows a READY=False status, the catalog image is not accessible from your mirror registry. You can check pod logs and check that the catalog image exists to troubleshoot this situation.
-
You completed a disconnected installation of Connectivity Link.
-
Check the catalog pod logs by running the following command:
$ oc logs -n openshift-marketplace -l olm.catalogSource=cs-redhat-operator-index-v{ocp-latest-version}Make sure you use the information that was created by the
oc mirrortool to run this command. -
Verify that the catalog image exists in the mirror registry by running the following command:
$ oc image info <mirror_registry>/redhat/redhat-operator-index:v{ocp-latest-version}Replace
<mirror_registry>with the path to your mirror registry.
Check for dependent Operators that are not installed
If you only see the Connectivity Link Operator ClusterServiceVersion, but the Authorino, Limitador, or DNS Operators are missing, the catalog might be missing digest references or the dependencies are not declared. You can track the source of the problem by checking a couple of resources.
-
You completed a disconnected installation of Connectivity Link.
-
Verify that all of the required Operators are available as
PackageManifestresources by running the following command:$ oc get packagemanifest -n openshift-marketplace | grep -E '(rhcl|authorino|limitador|dns)-operator' -
If any packages are missing, the catalog was not mirrored or applied correctly. Check that the catalog is ready and running with no errors and that the
ImageSetConfigurationis created correctly. -
Check that the
InstallPlanshows all dependencies by running the following command:$ oc get installplan -n <kuadrant_system> -o yaml-
Replace
<kuadrant_system>with the namespace in which you installed Connectivity Link. -
Look for all required Operators in the
InstallPlanspecification output.
-
-
If an Operator is missing, check the
InstallPlanfor errors or re-mirror the catalog.
Troubleshoot stuck pods in a disconnected installation
If your pods are stuck with an ImagePullBackOff status, this might mean that the image is either not in the mirror registry or that the ImageDigestMirrorSet object not applied correctly.
-
You completed a disconnected installation of Connectivity Link.
-
Verify that
ImageDigestMirrorSetexists by running the following command:$ oc get imagedigestmirrorset -
Check whether the specific image was mirrored by running the following command:
$ oc image info <mirror_registry>/rhcl-1/rhcl-operator@sha256:_<digest>_-
Replace
<mirror_registry>with the path to your mirror registry. -
Replace
<digest>with the complete digest value.
-
-
Check pod events by running the following command:
$ oc describe pod <pod_name> -n <kuadrant_system>-
Replace
<pod_name>with the name of the stuck pod. -
Replace
<kuadrant_system>with the namespace in which you installed Connectivity Link.
-