Atlas Kubernetes Operator で使用するための Kubernetes 構成リソースを生成して適用します。
このコマンドは、プロジェクト、配置、ユーザーを含む Atlas オブジェクトの構成を Kubernetes に直接エクスポートし、Atlas Kubernetes Operator を使用してこれらのリソースを管理できるようにします。 詳細については、 https://www.mongodb.com/ja-jp/docs/atlas/atlas-operator/ を参照してください。
構文
atlas kubernetes config apply [options] 
オプション
| 名前 | タイプ | 必須 | 説明 | 
|---|---|---|---|
| --clusterName | string | false | インポートする 1 つ以上のカンマ区切りのクラスター名 | 
| --dataFederationName | string | false | インポートする 1 つ以上のカンマで区切られたData Federation名 | 
| -h, --help | false | 適用用ヘルプ | |
| --independentResources | false | 独立使用をサポートする生成されたリソースを、 Kubernetes参照ではなく外部 ID を使用するようにするフラグ。 | |
| --kubeContext | string | false | 使用する kubeconfig コンテキストの名前。 | 
| --kubeconfig | string | false | CLI リクエストに使用する kubeconfig ファイルへのパス。 | 
| --operatorVersion | string | false | リソースを生成するための Atlas Kubernetes Operator のバージョン。 | 
| --orgId | string | false | 使用する組織ID。 このオプションは、構成ファイルまたは環境変数の 設定を上書きします。 | 
| --projectId | string | false | 使用するプロジェクトを識別する 16 進数の string。 このオプションは、構成ファイルまたは環境変数の 設定を上書きします。 | 
| --targetNamespace | string | false | 生成されたKubernetesエンティティに使用する名前空間 | 
継承されたオプション
| 名前 | タイプ | 必須 | 説明 | 
|---|---|---|---|
| -P, --profile | string | false | 構成ファイルから使用するプロファイルの名前。Atlas CLI のプロファイルの詳細については、https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. を参照してください。 | 
例
# Export and apply all supported resources of a specific project: atlas kubernetes config apply --projectId=<projectId> 
# Export and apply all supported resources of a specific project and to a specific namespace: atlas kubernetes config apply --projectId=<projectId> --targetNamespace=<namespace> 
# Export and apply all supported Project resource, and only the described Deployment resources of a specific project to a specific namespace: atlas kubernetes config apply --projectId=<projectId> --clusterName=<cluster-name-1, cluster-name-2> --targetNamespace=<namespace> 
# Export and apply all supported resources of a specific project to a specific namespace restricting the version of the Atlas Kubernetes Operator: atlas kubernetes config apply --projectId=<projectId> --targetNamespace=<namespace> --operatorVersion=1.5.1