0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ROKS 4.15以降でOperatorHubに必要なOperatorが存在しなかったら

Posted at

ROKSでは 4.15以降で Secure by Default Cluster VPC Networking という新しいセキュリティー機能が導入され、デフォルト状態ではクラスターが機能するために必要なトラフィックのみが許可され、その他のアクセスはすべてブロックされるようになりました。

そのため、OperatorHubにも最低限のOperatorしか存在しません。今回のクラスター(OCP 4.16) の場合は下の画面例のとおり6つだけでした。

デフォルト状態のOperatorHub画面例
image.png

IBM CloudコンソールでクラスターのOverview画面を見ると、Outbound traffic protection enabled が ON になっています。
image.png

通常どおり OperatorHub を使えるようにする

他のOperatorも使えるように設定を変更します。Red Hat Marketplaceと OperatorHubへのアウトバウンドトラフィックを許可する の手順を実行します。
* すべてのアウトバウンド・トラフィックを有効にする方法を実行しています。

1.IBM Cloud Shell で次のコマンドを実行します。

ibmcloud oc vpc outbound-traffic-protection disable --cluster CLUSTER

このコマンドを実行したことで、IBM Cloudコンソールからも Outbound traffic protection が disabled になったことを確認できました。
image.png

2.クラスタ上の OperatorHub に次のコマンドでパッチを適用して、podを起動できるようにします。

oc patch OperatorHub cluster --type json -p '[{"op": "remove", "path": "/spec/disableAllDefaultSources"}]'
(参考) patch前
$ oc get OperatorHub cluster -o yaml
(省略)
spec:
  disableAllDefaultSources: true
status:
  sources:
  - disabled: true
    name: redhat-operators
    status: Success
  - disabled: true
    name: certified-operators
    status: Success
  - disabled: true
    name: community-operators
    status: Success
  - disabled: true
    name: redhat-marketplace
    status: Success
(参考) patch後
$ oc get OperatorHub cluster -o yaml
(省略)
spec: {}
status:
  sources:
  - disabled: false
    name: redhat-operators
    status: Success
  - disabled: false
    name: certified-operators
    status: Success
  - disabled: false
    name: community-operators
    status: Success
  - disabled: false
    name: redhat-marketplace
    status: Success
(参考) 「podを起動できるようにします」のpod
$ oc get pod -n openshift-marketplace
NAME                                    READY   STATUS    RESTARTS   AGE
certified-operators-qpgjw               1/1     Running   0          58m
community-operators-zh5lc               1/1     Running   0          58m
marketplace-operator-699b5d89fd-4qg2s   1/1     Running   0          70m
redhat-marketplace-57dj6                1/1     Running   0          58m
redhat-operators-vjck9                  1/1     Running   0          58m

この作業により、OperatorHubに多数のOperatorが表示され、使用できるようになりました。

image.png

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?