ROKSでは 4.15以降で Secure by Default Cluster VPC Networking
という新しいセキュリティー機能が導入され、デフォルト状態ではクラスターが機能するために必要なトラフィックのみが許可され、その他のアクセスはすべてブロックされるようになりました。
そのため、OperatorHubにも最低限のOperatorしか存在しません。今回のクラスター(OCP 4.16) の場合は下の画面例のとおり6つだけでした。
IBM CloudコンソールでクラスターのOverview画面を見ると、Outbound traffic protection enabled
が ON になっています。
通常どおり 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 になったことを確認できました。
2.クラスタ上の OperatorHub に次のコマンドでパッチを適用して、podを起動できるようにします。
oc patch OperatorHub cluster --type json -p '[{"op": "remove", "path": "/spec/disableAllDefaultSources"}]'
$ 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
$ 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
$ 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が表示され、使用できるようになりました。
参考