OKD 4 : Configure Image Registry : emptyDIR
2022/04/21 |
After building OKD 4 Cluster, Image Registry is not configured by default.
So Configure Image Registry to pull container images.
On this example, it shows to configure emptyDIR as Image Registry.
OKD 4 Cluster is based on the environment like follows. --------------+----------------+ |10.0.0.25 | +-------------+-------------+ | | [mgr.okd4.srv.world] | | | Manager Node | | | DNS | | | Nginx | | +---------------------------+ | | --------------+----------------+-----------------+-------------- |10.0.0.40 |10.0.0.60 +-------------+-------------+ +--------------+-------------+ | [master-0.okd4.srv.world] | | [node-0.okd4.srv.world] | | Control Plane | | Compute Node | | | | | | | | | +---------------------------+ +----------------------------+ |
[1] | On Manager Node, Configure Image Registry. After setting it, [image-registry] Pod will start. |
[root@mgr ~]# oc get pods -n openshift-image-registry NAME READY STATUS RESTARTS AGE cluster-image-registry-operator-ddd96d697-kf7kl 1/1 Running 1 21h image-pruner-27508320-56zz9 0/1 Completed 0 100m node-ca-ccppv 1/1 Running 1 20h node-ca-wltgh 1/1 Running 1 20h
[root@mgr ~]#
[root@mgr ~]# oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}' config.imageregistry.operator.openshift.io/cluster patched [root@mgr ~]# oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"managementState":"Managed"}}' config.imageregistry.operator.openshift.io/cluster patched oc get pods -n openshift-image-registry NAME READY STATUS RESTARTS AGE cluster-image-registry-operator-ddd96d697-kf7kl 1/1 Running 1 21h image-pruner-27508320-56zz9 0/1 Completed 0 104m image-registry-789678785d-5ckcg 1/1 Running 0 3m23s node-ca-ccppv 1/1 Running 1 20h node-ca-wltgh 1/1 Running 1 20h |