8.2.4. クラスターのインポート


以下のいずれかの手順を実行してクラスターをインポートします。

  • 自動インポートを使用するには、インポートするクラスターの kubeconfig またはサーバーおよびトークンのペアのいずれかを含むシークレットを作成する必要があります。

    1. 以下のテンプレートのような内容を含む YAML ファイルを作成します。

      apiVersion: v1
      kind: Secret
      metadata:
        name: auto-import-secret
        namespace: <cluster_name>
      stringData:
        autoImportRetry: 5
        # If you are using the kubeconfig file, add the following value for the kubeconfig file
        # that has the current context set to the cluster to import:
        kubeconfig: |- <kubeconfig_file>
        # If you are using the token/server pair, add the following two values:
        token: <Token to access the cluster>
        server: <cluster_api_url>
      type: Opaque
      Copy to Clipboard
    2. ファイルを auto-import-secret.yaml として保存します。
    3. 以下のコマンドを使用して、YAML ファイルを適用します。

      oc apply -f auto-import-secret.yaml
      Copy to Clipboard
  • 手動によるインポートプロセスを使用するには、以下の手順を行います。

    1. 以下の YAML 例のように、ManagedCluster の例を編集します。

      apiVersion: cluster.open-cluster-management.io/v1
      kind: ManagedCluster
      metadata:
        name: <cluster_name>
        labels:
          cloud: auto-detect
          vendor: auto-detect
      spec:
        hubAcceptsClient: true
      Copy to Clipboard

      cloud および vendor の値を auto-detect する場合、Red Hat Advanced Cluster Management はインポートしているクラスターからクラウドおよびベンダータイプを自動的に検出します。オプションで、auto-detect の値をクラスターのクラウドおよびベンダーの値に置き換えることができます。以下の例を参照してください。

      cloud: Amazon
      vendor: OpenShift
      Copy to Clipboard
    2. ファイルは managed-cluster.yaml として保存します。
    3. 以下のコマンドを使用して、YAML ファイルを適用します。

      oc apply -f managed-cluster.yaml
      Copy to Clipboard

klusterlet のインポート を進めます。

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat