Symptoms
The following error message is displayed when installing KafkaConnectS2I
in an air-gapped environment:
unknown: unable to pull manifest from cp.icr.io/cp/ibm-eventstreams-kafka@sha256:a508bbc97cba7643a521c772a5ade4bd20dfa169156cafd4fda4d0614b3ad61b: Get https://cp.icr.io/v2/: dial tcp: lookup cp.icr.io on 10.166.0.10:53: no such host
Causes
In an isolated system, there is no network access to the entitled image registry cp.icr.io
.
Resolving the problem
To resolve the error, place the correct image into the cluster’s internal registry as follows.
Note: The <RELEASE_SHA>
in the following instructions is the SHA output in the error message. In the example mentioned earlier, it is a508bbc97cba7643a521c772a5ade4bd20dfa169156cafd4fda4d0614b3ad61b
-
Log in to the entitled registry:
docker login cp.icr.io
-
Pull the image:
docker pull cp.icr.io/cp/ibm-eventstreams-kafka@sha256:<RELEASE_SHA>
-
Tag the image:
docker tag cp.icr.io/cp/ibm-eventstreams-kafka@sha256:<RELEASE_SHA> default-route-openshift-image-registry.apps.<CLUSTER_NAME>/<NAMESPACE>/ibm-eventstreams-kafka:fix
-
If not already done, expose the OpenShift Container Platform registry with the following command:
oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
-
Log in to the OpenShift Container Platform registry:
docker login -u any_value -p $(oc whoami -t) default-route-openshift-image-registry.apps.<CLUSTER_NAME>
.Note: You might need to add your registry to your list of insecure registries in Docker.
-
Push the tagged image:
docker push default-route-openshift-image-registry.apps.<CLUSTER_NAME>/<NAMESPACE>/ibm-eventstreams-kafka:fix
-
Modify the
KafkaConnectS2I
custom resource to add theimage
property under thespec
:spec: image: image-registry.openshift-image-registry.svc:5000/<NAMESPACE>/ibm-eventstreams-kafka:fix
After following the steps, the correct image is added to the cluster’s internal registry, and the error message will no longer be displayed.