第 11 章 管理容器存储接口(CSI)组件放置

每个集群由多个专用节点组成,如 infrastorage 节点。但是,具有自定义污点的 infra 节点将无法在该节点上使用 OpenShift Data Foundation 持久性卷声明(PVC)。因此,如果要使用这样的节点,可以设置容限以在节点上调出 csi-plugins。如需更多信息,请参阅 https://access.redhat.com/solutions/4827161

流程

  1. 编辑 configmap,为自定义污点添加容限。记住在退出编辑器之前进行保存。

    $ oc edit configmap rook-ceph-operator-config -n openshift-storage
  2. 显示 configmap 以检查添加的容限。

    $ oc get configmap rook-ceph-operator-config -n openshift-storage -o yaml

    为污点添加的容限的输出示例 nodetype=infra:NoSchedule

    apiVersion: v1
    data:
    [...]
      CSI_PLUGIN_TOLERATIONS: |
        - key: nodetype
          operator: Equal
          value: infra
          effect: NoSchedule
        - key: node.ocs.openshift.io/storage
          operator: Equal
          value: "true"
          effect: NoSchedule
    [...]
    kind: ConfigMap
    metadata:
    [...]
  3. 如果 csi-cephfsplugin- * 和 csi-rbdplugin-* pod 无法自行在 infra 节点上找到,则重启 rook-ceph-operator

    $ oc delete -n openshift-storage pod <name of the rook_ceph_operator pod>

    示例:

    $ oc delete -n openshift-storage pod rook-ceph-operator-5446f9b95b-jrn2j
    
    pod "rook-ceph-operator-5446f9b95b-jrn2j" deleted

验证步骤

验证 csi-cephfsplugin-* 和 csi-rbdplugin-* pod 正在 infra 节点上运行。