4.12.18. 初始 Operator 配置
在 control plane 初始化后,您必须立即配置一些 Operator 以便它们都可用。
先决条件
- 您的 control plane 已初始化。
流程
观察集群组件上线:
$ watch -n5 oc get clusteroperators
输出示例
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE authentication 4.7.0 True False False 3h56m baremetal 4.7.0 True False False 29h cloud-credential 4.7.0 True False False 29h cluster-autoscaler 4.7.0 True False False 29h config-operator 4.7.0 True False False 6h39m console 4.7.0 True False False 3h59m csi-snapshot-controller 4.7.0 True False False 4h12m dns 4.7.0 True False False 4h15m etcd 4.7.0 True False False 29h image-registry 4.7.0 True False False 3h59m ingress 4.7.0 True False False 4h30m insights 4.7.0 True False False 29h kube-apiserver 4.7.0 True False False 29h kube-controller-manager 4.7.0 True False False 29h kube-scheduler 4.7.0 True False False 29h kube-storage-version-migrator 4.7.0 True False False 4h2m machine-api 4.7.0 True False False 29h machine-approver 4.7.0 True False False 6h34m machine-config 4.7.0 True False False 3h56m marketplace 4.7.0 True False False 4h2m monitoring 4.7.0 True False False 6h31m network 4.7.0 True False False 29h node-tuning 4.7.0 True False False 4h30m openshift-apiserver 4.7.0 True False False 3h56m openshift-controller-manager 4.7.0 True False False 4h36m openshift-samples 4.7.0 True False False 4h30m operator-lifecycle-manager 4.7.0 True False False 29h operator-lifecycle-manager-catalog 4.7.0 True False False 29h operator-lifecycle-manager-packageserver 4.7.0 True False False 3h59m service-ca 4.7.0 True False False 29h storage 4.7.0 True False False 4h30m
- 配置不可用的 Operator。
4.12.18.1. 禁用默认的 OperatorHub 源
在 OpenShift Container Platform 安装过程中,默认为 OperatorHub 配置由红帽和社区项目提供的源内容的 operator 目录。在受限网络环境中,必须以集群管理员身份禁用默认目录。
流程
通过在
OperatorHub
对象中添加disableAllDefaultSources: true
来禁用默认目录的源:$ oc patch OperatorHub cluster --type json \ -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'
提示
或者,您可以使用 Web 控制台管理目录源。在 Administration → Cluster Settings → Global Configuration → OperatorHub 页面中,点 Sources 选项卡,其中可创建、删除、禁用和启用单独的源。