OpenShift version: 4.3
Create Internal Image Registry Route
From the Infra Node, run the following commands. This will create a accessable path for you to push image to internal image registry.
1 | oc project openshift-image-registry |
Pull, Tag and Push Image
Here we use podman:
1 | ## pull original from other registry |
Create Role and Binding
You need to get authenicated when pull image from cluster image registry, here we create a dedicated service account under the target project, then grant privileges to this service account and specify it to yaml file.
1 | oc apply -f - << EOF |
Example pod yaml file:
1 | apiVersion: v1 |
Note that the default cluster registry path is
image-registry.openshift-image-registry.svc:5000
, consist of<svc name>.<project>.svc:<port>
. don’t use that route path.