CentOS Stream 9
Sponsored Link

OKD 4 : イメージレジストリー設定 : emptyDIR2022/08/02

 
当例のようにクラスターを構成した場合は、イメージレジストリーが未構成のため、イメージの Pull/Push ができません。
よって、イメージレジストリーを設定します。
当例では [emptyDIR] をストレージタイプとして設定します。
OKD 4 クラスターは以下の通り構成しています。
--------------+----------------+-----------------+--------------
              |10.0.0.25       |                 |10.0.0.24
+-------------+-------------+  |  +--------------+-------------+
|   [mgr.okd4.srv.world]    |  |  | [bootstrap.okd4.srv.world] |
|        Manager Node       |  |  |       Bootstrap Node       |
|           DNS             |  |  |                            |
|          Nginx            |  |  |                            |
+---------------------------+  |  +----------------------------+
                               |
--------------+----------------+-----------------+--------------
              |10.0.0.40       |                 |10.0.0.41
+-------------+-------------+  |  +--------------+-------------+
| [master-0.okd4.srv.world] |  |  |  [master-1.okd4.srv.world] |
|      Control Plane#1      |  |  |      Control Plane#2       | 
|                           |  |  |                            |
|                           |  |  |                            |
+---------------------------+  |  +----------------------------+
                               |
--------------+----------------+
              |10.0.0.42
+-------------+-------------+
| [master-2.okd4.srv.world] |
|      Control Plane#3      |
|                           |
|                           |
+---------------------------+

[1] Manager ノードでイメージレジストリーを設定します。設定後 [image-registry] Pod が起動します。
[root@mgr ~]#
oc get pods -n openshift-image-registry

NAME                                               READY   STATUS    RESTARTS   AGE
cluster-image-registry-operator-6754c97c5b-k7gjg   1/1     Running   1          117m
node-ca-ccvkb                                      1/1     Running   0          62m
node-ca-nv8ws                                      1/1     Running   0          81m
node-ca-rf8l7                                      1/1     Running   0          81m

[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
[root@mgr ~]#
oc get pods -n openshift-image-registry

NAME                                               READY   STATUS    RESTARTS   AGE
cluster-image-registry-operator-6754c97c5b-k7gjg   1/1     Running   1          119m
image-registry-c8664dbcd-wlzp7                     1/1     Running   0          49s
node-ca-ccvkb                                      1/1     Running   0          63m
node-ca-nv8ws                                      1/1     Running   0          83m
node-ca-rf8l7                                      1/1     Running   0          83m
関連コンテンツ