AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

AtlasPrivateEndpoint カスタム リソース

重要

レガシー サブリソースは、対応する CRD のリリース時点で非推奨となります。構成が現在、このリソース定義のサブリソース形式に依存している場合は、CRD に移行します。

AtlasPrivateEndpointカスタムリソースは、 Atlasプロジェクトのプライベートエンドポイントを構成します。これにより、パブリック ネットワーク経由で情報を送信せずに、クラウドプロバイダーをAtlas に接続できるようになります。プライベートエンドポイントは、仮想ネットワークから Atlasへの一方向接続です。

重要

カスタム リソースはデフォルトでオブジェクトを削除しなくなりました

  • Atlas Kubernetes Operator はカスタムリソース構成ファイルを使用して Atlas 構成を管理しますが、Atlas Kubernetes Operator2.0 以降、 Kubernetesで削除したカスタム リソースは Atlas で削除されなくなりました(デフォルトでは )。代わりに、Atlas Kubernetes Operator は Atlas 内のそれらのリソースの管理を停止します。 例、 Kubernetesで カスタム リソースを削除すると、デフォルトでは、Atlas Kubernetes Operator は AtlasAtlasProject から対応するプロジェクトを自動的に削除しなくなります。この動作の変更は、誤ってまたは予期せずに削除されるのを防ぐことを目的としています。 この動作を Atlas Kubernetes Operator. 以前に使用されていたデフォルトに戻す方法などの詳細については、「2 0新しいデフォルト: Atlas Kubernetes Operator. の削除保護2 0」を参照してください。

    同様に、Atlas Kubernetes Operator を使用してKubernetesの Atlasプロジェクトからチームを削除しても、Atlas Kubernetes Operator は Atlas からチームを削除しません。

  • デフォルトのAtlas 構成値が暗黙的に使用されるのを避けるために、必要な構成の詳細を明示的に定義します。 場合によっては、Atlas のデフォルトを継承すると調整ループが発生し、カスタムリソースがREADY 状態に達しなくなります。 例、含まれている例に示すように、 AtlasDeployment カスタムリソースで必要なオートスケーリング動作を明示的に定義すると、カスタムリソース内の静的インスタンスサイズが、オートスケーリングが有効になっている Atlas 配置に繰り返し適用されないことが保証されます。

    autoScaling:
    diskGB:
    enabled: true
    compute:
    enabled: true
    scaleDownEnabled: true
    minInstanceSize: M30
    maxInstanceSize: M40

Atlas Kubernetes Operator は、Atlas プライベートエンドポイント サービスAPIリソースを使用して次のいずれかのアクションを実行します。

  • 新しいプライベートエンドポイント サービスを作成します。

  • 既存のプライベートエンドポイント サービスを更新します。

Atlas Kubernetes Operator でプライベート エンドポイントを実装する方法の詳細については、プライベート エンドポイントの管理 を参照してください。

次の例は、my-projectプロジェクト内でAmazon Web Servicesのプライベートエンドポイントを定義するAtlasPrivateEndpointカスタムリソースを示しています。

apiVersion: atlas.mongodb.com/v1
kind: AtlasPrivateEndpoint
metadata:
name: my-atlas-pe1
spec:
projectRef:
name: my-project
namespace: my-operator-namespace
provider: AWS
region: us-east-1
awsConfiguration:
- id: vpcpe-xyz

The following example shows an AtlasPrivateEndpoint independent CRD that defines the same private endpoint defined in the Basic Example. This custom resource definition allows you to create this private endpoint in a project you don't manage in the same instance of Atlas Kubernetes Operator with which you define this resource. To enable independent operation, you must use an externalProjectRef instead of a projectRef, and you must supply a connectionSecret directly since this resource can't inherit API credentials from its parent project.

apiVersion: atlas.mongodb.com/v1
kind: AtlasPrivateEndpoint
metadata:
name: my-atlas-pe1
spec:
externalProjectRef:
projectID: 66e2f2b621571b7e69a89b66
connectionSecret:
name: atlas-connection-secret
provider: AWS
region: us-east-1
awsConfiguration:
- id: vpcpe-xyz

このセクションでは、使用可能なAtlasPrivateEndpointカスタム リソース パラメータについて説明します。

metadata.name

型: string

必須

Name that the AtlasPrivateEndpoint Custom Resource uses to add this private endpoint to a project.

metadata.namespace

型: string

任意

AtlasPrivateEndpoint カスタムリソースを含める名前空間。指定されていない場合、Atlas Kubernetes Operator は kubectl によって設定された現在の名前空間を使用します。

カスタム名前空間を定義する場合は、 フィールドのAtlasProject カスタムspec.privateEndpoint.privateEndpointRef.namespace リソースに追加する必要があります。

spec.awsConfiguration.id

型: string

条件付き

プライベートエンドポイント ネットワーク インターフェイスのID 。このパラメータは必須であり、Amazon Web Services のプライベートエンドポイントに限定されます。

spec.azureConfiguration.id

型: string

条件付き

プライベートエンドポイント ネットワーク インターフェイスのID 。このパラメーターは Azure プライベート エンドポイントでは必須であり、 Azureプライベート エンドポイントに限定されます。

spec.azureConfiguration.ipAddress

型: string

条件付き

Azure VNet 内のプライベートエンドポイントのIPアドレス。このパラメーターは Azure プライベート エンドポイントでは必須であり、 Azureプライベート エンドポイントに限定されます。

spec.connectionSecret.name

型: string

条件付き

Atlas Kubernetes Operator が Atlas に接続するために使用する組織IDとAPIキーを含む opaque secret の名前。指定されていない場合、Atlas Kubernetes Operator は次のいずれかにフォールバックします。

  • 親 atlasProject の spec.connectionSecretRef.name パラメータ

  • デフォルトの global シークレット(親 atlasProject に対して spec.connectionSecretRef.name が未定義の場合)

このパラメータは独立した CRD に必須です。

Atlas Kubernetes Operator atlas.mongodb.com/type=credentialsは、不要な シークレット の監視を回避するために、ラベル のシークレットのみを監視します。

次の例ではシークレットにラベルを付けます。

kubectl label secret the-user-password atlas.mongodb.com/type=credentials
spec.externalProjectRef.id

型: string

条件付き

ID of the project to which the private endpoint belongs. You must specify the project ID of an existing Atlas Project. This parameter is required for private endpoints that belong to projects managed by either:

  • Atlas Kubernetes Operator の別のインスタンス

  • Atlas Kubernetes Operator 以外のツール

Atlas Kubernetes Operator の同じインスタンスによって管理されるプロジェクトに属する配置では、 spec.externalProjectRef.id を使用しない場合は spec.projectRef.name を使用します。

プライベートエンドポイントは 1 つのプロジェクトにのみ属することができます。 複数のプロジェクトに同じプライベートエンドポイントを定義するには、プロジェクトごとにカスタムリソース定義 を作成します。

spec.gcpConfiguration.endpoints

タイプ: 配列

条件付き

このエンドポイントグループを構成する個々のプライベートエンドポイントのリスト。 このパラメータは、 Google Cloud Platformプライベートエンドポイントに限定されます。

spec.gcpConfiguration.endpoints.[n].ipAddress

型: string

条件付き

指定されたGoogle Cloud Platformプライベートエンドポイントが解決するIPアドレス。 このパラメータは、 Google Cloud Platformプライベートエンドポイントに限定されます。

spec.gcpConfiguration.endpoints.[n].name

型: string

条件付き

特定のGoogle Cloud Platformプライベートエンドポイントを一意に識別する名前。 このパラメータは、 Google Cloud Platformプライベートエンドポイントに限定されます。

spec.gcpConfiguration.groupName

型: string

条件付き

Google Cloud Platformプライベートエンドポイントのセットを一意に識別する名前。 このパラメータは、 Google Cloud Platformプライベートエンドポイントに限定されます。

spec.gcpConfiguration.projectId

型: string

条件付き

プライベートエンドポイントが属するGoogle Cloud Platformプロジェクトの一意の識別子。

spec.projectRef.name

型: string

条件付き

プライベートエンドポイントが属するプロジェクトの名前。 既存のAtlasProject カスタム リソース を指定する必要があります。このパラメーターは、同じインスタンスAtlas Kubernetes Operator によって管理されるプロジェクトに属するプライベートエンドポイントにのみ適用されます。

次のいずれかによって管理されるプロジェクトに属するプライベートエンドポイントの場合。

  • Atlas Kubernetes Operator の別のインスタンス

  • Atlas Kubernetes Operator 以外のツール

spec.externalProjectRef.id を使用します。

プライベートエンドポイントは 1 つのプロジェクトにのみ属することができます。 複数のプロジェクトに同じプライベートエンドポイントを定義するには、プロジェクトごとにカスタムリソース定義 を作成します。

spec.projectRef.namespace

型: string

条件付き

で指定されたAtlasProject カスタム spec.projectRef.nameリソースが存在する名前空間。

次のいずれかによって管理されるプロジェクトに属する配置の場合、次のいずれかによって管理されます。

  • Atlas Kubernetes Operator の別のインスタンス

  • Atlas Kubernetes Operator 以外のツール

このパラメーターを設定しないでください。

spec.provider

型: string

必須

プライベートエンドポイント サービスを作成するクラウドサービス プロバイダーの名前。

spec.region

型: string

必須

プライベートエンドポイント サービスを作成するクラウド・プロバイダーのリージョン。