3.3. ホストされたコントロールプレーンのノードプールの設定

ホストされたコントロールプレーンでは、管理クラスターの config map 内に MachineConfig オブジェクトを作成することでノードプールを設定できます。

手順

  1. 管理クラスターの config map 内に MachineConfig オブジェクトを作成するには、次の情報を入力します。

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: <configmap-name>
      namespace: clusters
    data:
      config: |
        apiVersion: machineconfiguration.openshift.io/v1
        kind: MachineConfig
        metadata:
          labels:
            machineconfiguration.openshift.io/role: worker
          name: <machineconfig-name>
        spec:
          config:
            ignition:
              version: 3.2.0
            storage:
              files:
              - contents:
                  source: data:...
                mode: 420
                overwrite: true
                path: ${PATH} 1
    1
    MachineConfig オブジェクトが保存されているノード上のパスを設定します。
  2. オブジェクトを config map に追加した後、次のように config map をノードプールに適用できます。

    spec:
      config:
        - name: ${CONFIGMAP_NAME}