8.2.5. klusterlet のインポート
以下の手順を実行して、klusterlet アドオン設定ファイルを作成および適用できます。
以下の例のような YAML ファイルを作成します。
apiVersion: agent.open-cluster-management.io/v1 kind: KlusterletAddonConfig metadata: name: <cluster_name> namespace: <cluster_name> spec: clusterName: <cluster_name> clusterNamespace: <cluster_name> applicationManager: enabled: true certPolicyController: enabled: true clusterLabels: cloud: auto-detect vendor: auto-detect iamPolicyController: enabled: true policyController: enabled: true searchCollector: enabled: true version: 2.3.0
-
ファイルは
klusterlet-addon-config.yaml
として保存します。 以下のコマンドを実行して YAML を適用します。
oc apply -f klusterlet-addon-config.yaml
注記: Red Hat OpenShift Dedicated クラスターをインポートし、
vendor=OpenShiftDedicated
のラベルを追加してベンダーが指定されないようにする場合、またはvendor=auto-detect
のラベルを追加する場合にはmanaged-by=platform
ラベルがクラスターに自動的に追加されます。この追加ラベルを使用して、クラスターを Red Hat OpenShift Dedicated クラスターとして識別し、Red Hat OpenShift Dedicated クラスターをグループとして取得できます。
ManagedCluster-Import-Controller は ${CLUSTER_NAME}-import
という名前のシークレットを生成します。${CLUSTER_NAME}-import
シークレットには、import.yaml
が含まれており、このファイルをユーザーがマネージドクラスターに適用して klusterlet をインストールします。
クラスターがインポートされました。