OKD 4 : イメージレジストリー設定 : emptyDIR
2022/04/21 |
クラスター構成直後のデフォルトではイメージレジストリーが未構成のため、イメージが Pull できません。
よって、イメージレジストリーを設定します。
当例では [emptyDIR] をストレージタイプとして設定します。
OKD 4 クラスターは以下の通り構成しています。 --------------+----------------+ |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] | Manager ノードでイメージレジストリーを設定します。設定後 [image-registry] Pod が起動します。 |
[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 |