MongoDB Controls for Kubernetes Operator は、書き込んだ仕様ファイルからコンテナ化されたMongoDB Ops Manager配置を作成します。
MongoDB Ops Managerリソース仕様を作成または更新したら、この仕様をKubernetes環境に適用するようにMongoDB Controls for Kubernetes Operator に指示します。 Kubernetes Operator は、 MongoDB Ops Manager に必要なサービスとカスタムKubernetesリソースを作成し、 MongoDB Ops Managerとそのバッキング アプリケーション データベースをKubernetes環境のコンテナに配置します。
MongoDB Ops Manager の各リソースは、 YAML のオブジェクト仕様を使用して、配置の特性と設定を定義します。
例
次の例は、 MongoDB Ops Manager配置のリソース仕様を示しています。
1 apiVersion: mongodb.com/v1 2 kind: MongoDBOpsManager 3 metadata: 4 name: om 5 spec: 6 topology: SingleCluster # optional, SingleCluster by default 7 opsManagerURL: https://link.to.configured.load-balancer.example.com # optional OM URL for the operator 8 replicas: 1 9 version: "8.0.0" 10 adminCredentials: ops-manager-admin-secret 11 configuration: 12 mms.fromEmailAddr: admin@example.com 13 mms.security.allowCORS: "false" 14 security: 15 tls: 16 ca: issuer-ca 17 backup: 18 enabled: true 19 encryption: 20 kmip: 21 server: 22 url: kmip.corp.mongodb.com:5696 23 ca: mongodb-kmip-certificate-authority-pem 24 headDB: 25 storage: "30Gi" 26 labelSelector: 27 matchLabels: 28 app: my-app 29 opLogStores: 30 - name: oplog1 31 # Sets labels for the oplog store. 32 assignmentLabels: ["test1", "test2"] 33 mongodbResourceRef: 34 name: my-oplog-db 35 mongodbUserRef: 36 name: my-oplog-user 37 s3Stores: 38 - name: s3store1 39 # Sets labels for the S3 store. 40 assignmentLabels: ["test1", "test2"] 41 42 mongodbResourceRef: 43 name: my-s3-metadata-db 44 mongodbUserRef: 45 name: my-s3-store-user 46 s3SecretRef: 47 name: my-s3-credentials 48 pathStyleAccessEnabled: true 49 s3BucketEndpoint: s3.region.amazonaws.com 50 s3BucketName: my-bucket 51 applicationDatabase: 52 passwordSecretKeyRef: 53 name: om-db-user-secret 54 key: password 55 members: 3 56 topology: SingleCluster 57 version: "7.0.21-ubi8" 58 featureCompatibilityVersion: "6.0" # During upgrade, set this FCV value to your currently deployed AppDB version. 59 security: 60 certsSecretPrefix: appdb 61 tls: 62 ca: issuer-ca
1 apiVersion: mongodb.com/v1 2 kind: MongoDBOpsManager 3 metadata: 4 name: om 5 spec: 6 topology: MultiCluster # optional, SingleCluster by default 7 opsManagerURL: https://link.to.configured.lb.example.com # optional OM URL for the operator 8 clusterSpecList: # optional ClusterSpecOMItem list, the type is different than ClusterSpecItem for AppDB and MongoDB 9 - clusterName: cluster-1 # required 10 replicas: 1 # required, OM application replicas 11 # optional parameters to override those defined at MongoDBOpsManager level 12 clusterDomain: cluster-1.example.com # optional, default cluster.local 13 jvmParameters: ["-Xmx4352m","-Xms4352m"] 14 externalConnectivity: # optional to override 15 type: LoadBalancer 16 port: 9090 17 annotations: 18 key: value 19 statefulSet: # StatefulSetSpecWrapper override 20 spec: {} 21 metadata: {} 22 configuration: 23 automation.versions.source: mongodb 24 mms.adminEmailAddr: cloud-manager-support@mongodb.com 25 backup: # MongoDBOpsManagerBackup, optional, we only support a subset of fields 26 members: 1 # backup daemon replicas, optional, default=1 27 assignmentLabels: [] # assignment labels to override 28 jvmParameters: ["-Xmx4352m","-Xms4352m"] # optional 29 statefulSet: # mdbc.StatefulSetConfiguration, optional to override for backup daemon 30 spec: {} 31 metadata: {} 32 - clusterName: cluster-2 33 replicas: 1 34 35 .... 36 37 replicas: 1 38 version: "8.0.0" 39 adminCredentials: ops-manager-admin-secret 40 configuration: 41 mms.fromEmailAddr: admin@example.com 42 mms.security.allowCORS: "false" 43 backup: 44 enabled: true 45 encryption: 46 kmip: 47 server: 48 url: kmip.corp.mongodb.com:5696 49 ca: mongodb-kmip-certificate-authority-pem 50 headDB: 51 storage: "30Gi" 52 labelSelector: 53 matchLabels: 54 app: my-app 55 opLogStores: 56 - name: oplog1 57 # Sets labels for the oplog store. 58 assignmentLabels: ["test1", "test2"] 59 mongodbResourceRef: 60 name: my-oplog-db 61 mongodbUserRef: 62 name: my-oplog-user 63 s3Stores: 64 - name: s3store1 65 # Sets labels for the S3 store. 66 assignmentLabels: ["test1", "test2"] 67 68 mongodbResourceRef: 69 name: my-s3-metadata-db 70 mongodbUserRef: 71 name: my-s3-store-user 72 s3SecretRef: 73 name: my-s3-credentials 74 pathStyleAccessEnabled: true 75 s3BucketEndpoint: s3.region.amazonaws.com 76 s3BucketName: my-bucket 77 security: 78 tls: 79 ca: issuer-ca 80 applicationDatabase: 81 passwordSecretKeyRef: 82 name: om-db-user-secret 83 key: password 84 version: "8.0.0-ubi8" 85 topology: MultiCluster 86 clusterSpecList: 87 - clusterName: cluster1.example.com 88 members: 4 89 - clusterName: cluster2.example.com 90 members: 3 91 - clusterName: cluster3.example.com 92 members: 2 93 security: 94 certsSecretPrefix: appdb 95 tls: 96 ca: issuer-ca
MongoDB Ops Managerの必要設定
このセクションでは、すべてのMongoDB Ops Managerリソースに使用する必要がある設定について説明します。
spec.adminCredentials型: string
必須。 Kubernetes シークレット の名前 MongoDB Ops Manager 管理ユーザー用に作成したMongoDB Ops Managerリソースを配置すると、 Kubernetes Operator によってこれらの認証情報を持つユーザーが作成されます。
注意
Kubernetes の単一クラスター配置でシークレットが保存されないようにするには、 すべてのシークレットをシークレットストレージツールに移行 します。複数のKubernetesクラスターでの配置では、HashiCorp Vault などのシークレットストレージツールへのシークレットの保存はサポートされていません。
管理者ユーザーには、グローバル所有者ロールが付与されます。
spec.replicasタイプ: 整数
Conditional. Number of Ops Manager instances to run in parallel. If you specify
SingleClusterinspec.topology, this parameter is required. The mimimum accepted value is1.If you specify
MultiClusterinspec.topology, this parameter is ignored.
MongoDB Ops Manager任意設定
MongoDB Ops Manager リソースでは、次の設定も使用できます。
spec.backup.fileSystemStores型: string
ファイルシステム読み取りを識別する名前。詳しくは、Kubernetes 演算子を使用したファイル システム バックアップ保存の構成を参照してください。
spec.backup.logging.LogBackAccessRef型: string
MongoDB Ops Managerバックアップ ログを構成するためのカスタム
logback-access.xmlファイルを含む ConfigMap への参照。ConfigMap のキーは、 MongoDB Ops Managerポッド内のデフォルトの ファイルを置き換えるために、
logback-access.xmlの名前と完全に一致する必要があります。
spec.backup.logging.LogBackRef型: string
Reference to a ConfigMap that contains a custom
logback.xmlfile. このファイルは、ログ ローテーション ポリシー、ログ レベル、およびその他のロギング パラメーターを含む、 MongoDB Ops Managerバックアップの一般的なログ動作を構成します。ConfigMap のキーは、 MongoDB Ops Managerポッド内のデフォルトの ファイルを置き換えるために、
logback-access.xmlの名前と完全に一致する必要があります。 詳しくは、「 CRD を使用してMongoDB Ops Managerログを構成する 」を参照してください。
spec.logging.LogBackAccessRef型: string
MongoDB Ops Managerログを構成するためのカスタム
logback-access.xmlファイルを含む ConfigMap への参照。ConfigMap のキーは、 MongoDB Ops Managerポッド内のデフォルトの ファイルを置き換えるために、正確に
logback-access.xmlである必要があります。
spec.logging.LogBackRef型: string
カスタム
logback.xmlファイルを含むコンフィギュレーションマップへの参照。 このファイルは、ログ ローテーション ポリシー、ログ レベル、およびその他のログ パラメーターを含む、 MongoDB Ops Managerの一般的なログ動作を構成します。ConfigMap のキーは、 MongoDB Ops Managerポッド内のデフォルトの ファイルを置き換えるために、正確に
logback.xmlである必要があります。詳しくは、「 CRD を使用してMongoDB Ops Managerログを構成する 」を参照してください。
注意
If the size of files the Ops Manager dashboard generates is larger than the storage space available in the
emptyDirvolume, consider overriding theemptyDirvolume with a Persistent Volume to prevent pod crashes. To learn more, seespec.statefulSet.spec.template.spec.volumes.
spec.opsManagerURL型: string
任意。 Kubernetes Operator 内の MongoDB Ops Manager リソースの URL(例:
https://link.to.configured.lb.example.com。このパラメータを省略すると、MongoDB Ops Manager インスタンスに接続するために、Kubernetes Operator は MongoDB Ops Manager インスタンスのデフォルトとして次の URL を使用します:
<om-name>-svc.{namespace}.svc.cluster.local。 これは、MongoDB Ops Manager のヘッドレス サービスのFQDNです。このパラメータを指定すると、この URL を別の URL に変更できるようになります。
注意
Don't confuse the
spec.opsManagerURLwith the URL that you specify in a ConfigMap for a particular deployment to configure MongoDB deployments and Monitoring Agents for the Application Database. The Kubernetes Operator requires to have thespec.opsManagerURLto directly connect to Ops Manager instances and to configure Ops Manager and Application Database deployments. The Kubernetes Operator doesn't use thespec.opsManagerURLto manage particular MongoDB databases.Change the
spec.opsManagerURLparameter to a custom URL in the following cases:MongoDB Ops Managerを複数のKubernetes クラスターにわたって配置しており、 のホスティングURL MongoDB Ops Managerポッドからデフォルト にアクセスできない場合。たとえば、MongoDB Ops Manager KubernetesKubernetesOperator を配置するクラスター以外の クラスターに配置する場合、MongoDB Ops Manager サービスの FQDN にアクセスできない可能性があります。この場合は、カスタム URL を指定できます。
外部ドメイン上の MongoDB Ops Manager インスタンスへの外部アクセスを構成する場合は、カスタム URL を指定できます。 これには、Kubernetes Operator とアプリケーション データベースのモニタリングエージェントも、デフォルトではなくこのカスタム URL を使用する必要があります。
spec.clusterDomain型: string
Kubernetes assigns each Pod a FQDN. The Kubernetes Operator calculates the FQDN for each Pod using a provided
clusterDomain. Kubernetes doesn't provide an API to query these hostnames.
spec.clusterName型: string
Kubernetes assigns each Pod a FQDN. The Kubernetes Operator calculates the FQDN for each Pod using a provided
clusterName. Kubernetes doesn't provide an API to query these hostnames.
spec.configurationタイプ: コレクション
Ops Manager configuration properties. See Ops Manager Configuration Settings for property names and descriptions. Each property takes a value of type
string.重要
MongoDB Ops Manager が、配置先の Kubernetes クラスターの外部に配置された MongoDB リソースを管理する場合は、
mms.centralUrl設定をspec.configurationに追加する必要があります。URLMongoDB Ops ManagerがKubernetes クラスターの外部で公開される に値を設定します。
詳細については、「外部 MongoDB デプロイの管理 」を参照してください。
spec.configuration.mms.featureFlag.automation.verifyDownloads型: string
enabledに設定されている場合、MongoDB Agent は、MongoDB Ops Manager インスタンスが管理するすべての MongoDB 配置の署名ファイルを必要とします。このオプションを有効にして MongoDB Agent をアップグレードすると、MongoDB Agent の現在のバージョンに新しい MongoDB Agent バイナリの署名ファイルが必要になります。
詳しくは、「 MongoDB 署名の検証 」を参照してください。
spec.configuration.mms.featureFlag.backup.queryableタイプ: ブール値
クエリ可能なバックアップを無効にするには、 を
falseに設定します。
spec.configuration.mms.featureFlag.backup.wt.queryableタイプ: ブール値
WiredTiger を使用する際にクエリ可能なバックアップを無効にするには、 を
falseに設定します。
spec.configuration.mms.mongoDbUsage.defaultUsageType型: string
Kubernetes サービスのデフォルトのサーバータイプ。
指定可能な値は、
PRODUCTION_SERVER、TEST_SERVER、DEV_SERVER、RAM_POOLです。
spec.jvmParametersタイプ: 文字列の配列
Optional. JVM parameters passed to the Ops Manager Application in the container. Any parameters given replace the default JVM parameters for the Ops Manager Application.
この Kubernetes Operator パラメーターのデフォルトは空のリストです。
spec: jvmParameters: ["-XX:+HeapDumpOnOutOfMemoryError","-XX:HeapDumpPath=/tmp"] 重要
JVM メモリ ヒープの値は自分のリスクで変更
Kubernetes Operator calculates its JVM memory heap values of the Ops Manager Application based on the container's memory. Changing the
-Xmsand-Xmxvalues can cause issues with Ops Manager.
spec.security.certsSecretPrefix型: string
Kubernetes シークレット のプレフィックスに適用するテキスト MongoDB Ops Manager の TLS キーと証明書を含む を作成した
シークレットには
<prefix>-<metadata.name>-certという名前を付ける必要があります。MongoDB Ops ManagerインスタンスをHTTPS 経由で実行するように構成する方法については、「 MongoDB Ops Managerリソースの配置 」を参照してください。
spec.security.tls.caKubernetesConfigMap の名前 のカスタム CA MongoDB Ops Managerファイルが含まれています。
重要
spec.security.tls.cais required if you use a custom CA to sign your Ops Manager TLS certificates.Kubernetes Operator では、ConfigMap でMongoDB Ops Managerリソース
mms-ca.crtの証明書に名前を付ける必要があります。このCAは、次の証明書に署名します。
クライアントが を使用して MongoDB Ops Manager アプリケーションに接続する、
アプリケーション データベース ポッド 内のエージェントは、 MongoDB Ops Managerと通信するために使用します。
警告
You must concatenate your custom CA file and the entire TLS certificate chain from
downloads.mongodb.comto prevent Ops Manager from becoming inoperable if the application database restarts.
spec.security.tls.enabled重要
spec.security.tls.enabledis deprecated and will be removed in a future release. To enable TLS, provide a value for thespec.security.certsSecretPrefixsetting.TLS証明書を使用して、クライアントとMongoDB Ops Manager間の通信を暗号化します。
spec.statefulSet.specタイプ: コレクション
MongoDB Controls for Kubernetes Operator が MongoDB Ops Manager 用に作成するステートフルセットの仕様。
spec.statefulSet.specに追加できるフィールドを確認するには、 Kubernetesドキュメントの「 StateftSetSpec v1 アプリ 」を参照してください。
spec.statefulSet.spec.templateタイプ: コレクション
Template for the Kubernetes Pods in the StatefulSet that the MongoDB Controllers for Kubernetes Operator creates for the Ops Manager.
注意
The Kubernetes Operator doesn't validate the fields you provide in
spec.statefulSet.spec.template.
spec.statefulSet.spec.template.metadataタイプ: コレクション
MongoDB Controls for Kubernetes Operator がMongoDB Ops Manager用に作成するステートメントセット内のKubernetesポッドのメタデータ。
To review which fields you can add to
spec.statefulSet.spec.template.metadata, see the Kubernetes documentation.
spec.statefulSet.spec.template.specタイプ: コレクション
MongoDB Controls for Kubernetes Operator がMongoDB Ops Manager用に作成するステートメントセット内のKubernetesポッドの仕様。
To review the complete list of fields you can add to
spec.statefulSet.spec.template.spec, see the Kubernetes documentation.次の例では、
spec.statefulSet.spec.template.specは、 Kubernetes演算子用のMongoDB MongoDB Ops Managerコンテナの最小と最大の CPU とメモリキャパシティーを定義します。Tip
Ops Manager コンポーネントを**実行する**ホストするのハードウェア、ソフトウェア、およびネットワーク要件の詳細については、Ops Manager ドキュメントの「Ops Manager システム要件」を参照してください。
statefulSet: spec: template: spec: containers: - name: mongodb-ops-manager resources: requests: cpu: "4" memory: "16Gi" limits: cpu: "8" memory: "32Gi"
spec.statefulSet.spec.template.spec.containersタイプ: コレクション
MongoDB Controls for Kubernetes Operator が MongoDB Ops Manager 用に作成するステートメントセット内のKubernetesポッドに属するコンテナのリスト。
MongoDB Ops Managerコンテナの仕様を変更するには、次の例に示すように、
nameフィールドを使用してコンテナの正確な名前を指定する必要があります。backup: statefulSet: spec: template: spec: containers: - name: mongodb-ops-manager 注意
spec.statefulSet.spec.template.spec.containersにコンテナを追加すると、Kubernetes Operator はそれらを Kubernetes ポッドに追加します。 これらのコンテナは、ポッド内のMongoDB Ops Managerコンテナに追加されます。
spec.statefulSet.spec.template.spec.containers.resources.requests.cpu型: string
Kubernetes ノード で使用可能である必要がある最小 CPU 容量 は、MongoDB Ops Manager をホストします。
The requested value must be less than or equal to
spec.statefulSet.spec.template.spec.containers.resources.limits.cpu.
spec.statefulSet.spec.template.spec.containers.resources.limits.cpu型: string
Maximum CPU capacity for the node being created to host the Ops Manager. If omitted, this value is set to
spec.statefulSet.spec.template.spec.containers.resources.requests.cpu.
spec.statefulSet.spec.template.spec.containers.resources.requests.memory型: string
KubernetesでMongoDB Ops Manager をホストするためにKubernetesノードで使用可能である必要がある最小メモリキャパシティー。この値は、JEDEC 表記では、整数とそれに続くメモリ単位として表されます。
例
MongoDB Ops Manager上の にKubernetes 6 ギガバイトのメモリが必要な場合は、この値を
6Giに設定します。注意
MongoDB では、この値を少なくとも
5Giに設定することを推奨しています。The requested value must be less than or equal to
spec.statefulSet.spec.template.spec.containers.resources.limits.memory.
spec.statefulSet.spec.template.spec.containers.resources.limits.memory型: string
Maximum memory capacity for the node being created to host the Ops Manager. If omitted, this value is set to
spec.statefulSet.spec.template.spec.containers.resources.requests.memory.Kubernetes Operator は、コンテナのメモリに基づいて Java ヒープ サイズのパラメータを計算し、設定します。
警告
この値は 32 GB 未満に制限します
この値を 32 GB(
32Gi)を超える値に設定すると、バックアップサービスに問題が発生する可能性があります。 ヒープが過剰な場合、 MongoDB Ops Managerで予期しない結果を引き起こす可能性があります。
spec.statefulSet.spec.template.spec.volumesタイプ: コレクション
MongoDB Controls for Kubernetes Operator が Ops Manager 用に作成するステートメントセット内でコンテナがマウントできるボリュームのリスト。
Ops Manager ダッシュボードを使用して配置のログをリクエストし、一時ファイルのサイズが大幅に大きい場合は、Ops Manager の StatefulSet の
dataKubernetes ボリュームに永続ボリュームを使用することを検討してください。dataKubernetesボリュームはデフォルトでemptyDirタイプを使用します。これを上書きして永続ボリュームを使用するには、次の構成をMongoDBOpsManagerリソースに追加します。statefulSet: spec: template: spec: volumes: - name: data persistentVolumeClaim: claimName: <my-pvc> <my-pvc>をKubernetes PersistentVolumeClaim の名前に置き換えます。
外部接続設定
このセクションでは、 MongoDB Ops Managerの外部接続に関連するオプションの設定について説明します。 MongoDB Ops Managerマルチクラスター配置に固有のオプションの外部接続設定については、「マルチクラスター設定 」を参照してください。
spec.externalConnectivityタイプ: コレクション
MongoDB Ops Managerへの外部接続を有効にする 構成オブジェクト。 指定した場合、 Kubernetes Operator はKubernetesサービスを作成し、 Kubernetesクラスターの外部からのトラフィックがMongoDB Ops Managerアプリケーションに到達できるようにします。
指定しない場合、Kubernetes Operator は Kubernetes サービスを作成しません。 手動で作成するか、サードパーティのソリューションを使用して外部トラフィックをMongoDB Ops Manager クラスター内のKubernetes アプリケーションにルーティングする必要があります。
spec.externalConnectivity.type型: string
Kubernetesサービス ServiceType MongoDB Ops ManagerKubernetesこれは を の外部で公開します。
Required if
spec.externalConnectivity.typeis present.指定可能な値は
LoadBalancerとNodePortです。 クラウドプロバイダーがサポートしている場合は、LoadBalancerが推奨されます。 ローカル配置にはNodePortを使用します。
spec.externalConnectivity.portタイプ: 整数
KubernetesサービスがMongoDB Ops Managerアプリケーションを外部トラフィックに使用するポートを示す値。
If
spec.externalConnectivity.typeisNodePort:Kubernetesサービスは、 MongoDB Ops Managerアプリケーションをこのポートを介して外部トラフィックに公開します。
If you don't provide a
spec.externalConnectivity.portvalue, the Kubernetes service routes traffic to the Ops Manager Application from an available port selected randomly from the following default range:30000-32767.注意
このポート経由のトラフィックを許可するには、ネットワークのファイアウォールを設定する必要があります。
If
spec.externalConnectivity.typeisLoadBalancer:クラウドプロバイダーが作成するロード バランサー リソースは、このポートを介してMongoDB Ops Managerアプリケーションを公開します。
spec.externalConnectivity.port値を指定しない場合、 Kubernetesサービスは Ops Manager アプリケーションをデフォルトのHTTP (8080 )または HTTPS(8443 )ポートを介して外部トラフィックに公開します。
spec.externalConnectivity.loadBalancerIP型: string
Kubernetes Operator による作成時に
LoadBalancerKubernetes サービスが使用する IP アドレス。This setting can only be used if your cloud provider supports it and
spec.externalConnectivity.typeisLoadBalancer. To learn more about the Type LoadBalancer, see the Kubernetes documentation.
spec.externalConnectivity.externalTrafficPolicy型: string
MongoDB Ops Manager Kubernetesサービスへの外部トラフィックのルーティング ポリシー。 サービスは、この設定の値に応じて外部トラフィックをノードローカルまたはクラスター全体のエンドポイントにルーティングします。
指定可能な値は
ClusterとLocalです。要件を満たす値については、 Kubernetesドキュメントの「 Kubernetesのソース IP 」を参照してください。注意
Clusterを選択した場合、Kubernetes ネットワーク境界で発生するネットワーク ホスティング中にクライアントのSource-IPが失われます。
spec.externalConnectivity.annotationsタイプ: コレクション
クラウドプロバイダー固有の構成設定を提供できるキーと値のペア。
注釈 の詳細については、 での TLS サポート については、Amazon Web ServicesKubernetes のドキュメント を参照してください。
バックアップ設定
このセクションでは、 MongoDB Ops Managerのバックアップに関連するオプション設定について説明します。 マルチクラスターMongoDB Ops Manager配置に固有のオプションのバックアップ設定については、「マルチクラスター設定 」を参照してください。
spec.backup.assignmentLabelsタイプ: 文字列の配列
バックアップデーモン サービスプロセスの割り当てラベルのリスト。 割り当てラベル を使用して、特定のバックアップデーモン プロセスが特定のプロジェクトに関連付けられていることを識別します。 Kubernetes Operator を使用して割り当てラベルを設定すると、割り当てラベルのKubernetes構成ファイルで設定した値が、 MongoDB Ops Manager UI で定義された値を上書きします。 Kubernetes Operator を使用して設定しない割り当てラベルは、 MongoDB Ops Manager UI で設定された値を引き続き使用します。
spec.backup.enabledタイプ: ブール値
MongoDB Ops Managerリソースのバックアップを有効にするフラグ。
falseに設定されている場合、バックアップは無効になります。デフォルト値は
trueです。
spec.backup.encryption.kmip型: オブジェクト
KMIPバックアップ暗号化の構成設定を含むオブジェクトです。 詳細については、「 MongoDB Ops Managerの KMIP バックアップ暗号化の構成 」を参照してください。
注意
If you set this parameter, the API key linked with the value of
spec.credentialsmust have theGlobal Ownerrole.
spec.backup.encryption.kmip.server.ca型: string
Human-readable label that identifies the ConfigMap that contains an entry for the CA certificate (
ca.pem) to use for KMIP authentication.
spec.backup.encryption.kmip.server.url型: string
URL for the KMIP server that uses the
hostname.portformat (for example,192.168.1.3:5696ormy-kmip-server.mycorp.com:5696).
spec.backup.headDBタイプ: コレクション
ヘッドデータベースの構成設定。Kubernetes Operator は、指定された構成で永続的なボリューム要求を作成します。
スカラーデータ型説明labelSelectorstring
storagestring
永続ボリューム の最小サイズ マウントする必要があるもの。この値は、 JEDEC表記では、整数とそれに続くストレージの単位として表されます。
デフォルト値は
30Giです。詳細については、「バックアップデーモンのハードウェア要件 」を参照してください。
たとえば、ヘッドデータベースに60ギガバイトのストレージが必要な場合は、この値を
60Giに設定します。storageClassstring
永続的なボリューム要求 で指定されるストレージのタイプ 。このストレージ タイプは、 StorageClass として作成できます。 この オブジェクト で使用する前にオブジェクトを 仕様。
Make sure to set the StorageClass
reclaimPolicyto Retain. This ensures that data is retained when a Persistent Volume Claim is removed.
spec.backup.jvmParametersタイプ: 文字列の配列
任意。 コンテナ内の バックアップ サービスに渡される JVM パラメータ。MongoDB Ops Manager
この Kubernetes Operator パラメーターのデフォルトは空のリストです。
spec: backup: jvmParameters: ["-XX:+UseStringCache"] 警告
JVM メモリ ヒープの値は自分のリスクで変更
Kubernetes Operator calculates the JVM memory heap values of the backup service based on the container's memory. Changing the
-Xmsand-Xmxvalues can cause issues with Ops Manager.
spec.backup.membersタイプ: 整数
Optional. Number of backup daemon services to deploy in Kubernetes. If not specified, defaults to
1. To ensure high availability for your backup service, deploy multiple backup daemons in Ops Manager.
spec.backup.opLogStoresタイプ: コレクション
バックアップを有効にする場合は必須です。 バックアップに使用されるoplog ストアの配列。 配列内の各項目は、 Kubernetes Operator によって Kubernetes クラスターに配置された MongoDB database リソースを参照します。
spec.backup.opLogStores.assignmentLabelsタイプ: 文字列の配列
oplog ストアの割り当てラベルのリスト。 割り当てラベルを使用して、特定の oplog ストアが特定のプロジェクトに関連付けられていることを識別します。 Kubernetes Operator を使用して割り当てラベルを設定すると、割り当てラベルのKubernetes構成ファイルで設定した値が、 MongoDB Ops Manager UI で定義された値を上書きします。 Kubernetes Operator を使用して設定しない割り当てラベルは、 MongoDB Ops Manager UI で設定された値を引き続き使用します。
spec.backup.opLogStores.name型: string
バックアップを有効にする場合は必須です。 oplog ストアの名前。
重要
oplog ストアの名前を指定した後は、その名前を編集しないでください。
spec.backup.opLogStores.mongodbResourceRef.name型: string
バックアップを有効にする場合は必須です。 oplog スライスを保存するために作成する
MongoDBリソースまたはMongoDBMultiClusterリソースの名前。 このリソースは、 MongoDB Ops Managerのリソースと同じ名前空間に配置する必要があります。oplogデータベースは
SCRAM認証メカニズムのみをサポートしています。 他の認証メカニズムを有効にすることはできません。oplog データベースで
SCRAM認証を有効にする場合は、次の操作を行う必要があります。MongoDBMongoDB Ops Managerをoplog データベースに接続するための ユーザー リソースを作成します。
Specify the
nameof the user in the Ops Manager resource definition.
この名前の MongoDB database リソースが存在しない場合、
backupリソースはPending状態になります。 Kubernetes Operator は、この名前の MongoDB database リソースが作成されるまで、10 秒ごとに再試行します。注意
この設定で参照するデータベース リソースにセキュリティを変更すると、 Kubernetes Operator はMongoDB Ops Managerリソースの調整を自動的に開始します。 Kubernetes Operator は、 の変更に基づいてMongoDB Ops Manager構成の
mongoUriフラグとsslフラグを更新します。
spec.backup.opLogStores.mongodbUserRef.name型: string
SCRAMOplog Store Databaseで 認証が有効になっている場合は必須です。MongoDBへの接続に使用される ユーザーOplog Store Database リソースの名前。このユーザー リソースをMongoDB Ops Managerのリソースと同じ名前空間に、次のすべてのロールを使用して配置します。
spec.backup.blockStoresタイプ: コレクション
ブロックストアを使用してバックアップを有効にする場合は必須です。 バックアップに使用されるブロックストアの配列。 配列内の各項目は、 Kubernetes Operator によって Kubernetes クラスターに配置された MongoDB database リソースを参照します。
spec.backup.blockStores.assignmentLabelsタイプ: 文字列の配列
ブロックストア の割り当てラベルのリスト。 割り当てラベルを使用して、特定のブロックストアが特定のプロジェクトに関連付けられていることを識別します。 Kubernetes Operator を使用して割り当てラベルを設定すると、割り当てラベルのKubernetes構成ファイルで設定した値が、 MongoDB Ops Manager UI で定義された値を上書きします。 Kubernetes Operator を使用して設定しない割り当てラベルは、 MongoDB Ops Manager UI で設定された値を引き続き使用します。
spec.backup.blockStores.name型: string
ブロックストアを使用してバックアップを有効にする場合は必須です。 ブロックストアの名前。
重要
一度指定したブロックストアの名前は編集しないでください。
spec.backup.blockStores.mongodbResourceRef.name型: string
ブロックストアを使用してバックアップを有効にする場合は必須です。 ブロックストア用に作成する MongoDB database リソースの名前。 このデータベース リソースは、 MongoDB Ops Managerリソースと同じ名前空間に配置する必要があります。
ブロックストア データベースは
SCRAM認証メカニズムのみをサポートしています。 他の認証メカニズムを有効にすることはできません。ブロックストア データベースで
SCRAM認証を有効にする場合は、次の操作を行う必要があります。をブロックストア データベースに接続するための MongoDBユーザー リソースを作成します。MongoDB Ops Manager
Specify the
nameof the user in the Ops Manager resource definition.
この名前の MongoDB database リソースが存在しない場合、
backupリソースはPending状態になります。 Kubernetes Operator は、この名前の MongoDB database リソースが作成されるまで、10 秒ごとに再試行します。注意
この設定で参照するデータベース リソースにセキュリティを変更すると、 Kubernetes Operator はMongoDB Ops Managerリソースの調整を自動的に開始します。 Kubernetes Operator は、 の変更に基づいてMongoDB Ops Manager構成の
mongoUriフラグとsslフラグを更新します。
spec.backup.blockStores.mongodbUserRef.name型: string
ブロックストア データベースで SCRAM 認証が有効になっている場合は必須です。 ブロックストア データベースに接続するために使用される MongoDB ユーザー リソースの名前。 このユーザー リソースをMongoDB Ops Managerのリソースと同じ名前空間に、次のすべてのロールを使用して配置します。
spec.backup.queryableBackupSecretRef.name型: string
Name of the secret that contains the queryable.pem file from Ops Manager that you will use for accessing and querying backups based on your deployment's TLS requirements.The PEM file contains a public key certificate and its associated private key that are needed to access and run queries on backup snapshots in Ops Manager. To query backups, specify the value for this parameter. If not set, backups are not affected, but you can't query them.
spec.backup.statefulSet.specタイプ: コレクション
MongoDB Controls for Kubernetes Operator がバックアップデーモンサービス用に作成するステートフルセットの仕様。
To review which fields you can add to
spec.backup.statefulSet.spec, see StatefulSetSpec v1 apps in the Kubernetes documentation.
spec.backup.statefulSet.spec.templateタイプ: コレクション
テンプレート MongoDB Controls for Kubernetes Operator がバックアップデーモンサービス用に作成する ステートメントセット 内の Kubernetes ポッドの テンプレート。
注意
The Kubernetes Operator doesn't validate the fields you provide in
spec.backup.statefulSet.spec.template.
spec.backup.statefulSet.spec.template.metadataタイプ: コレクション
MongoDB Controls for Kubernetes Operator がバックアップデーモンサービス用に作成するステートメントセット内のKubernetesポッドのメタデータ。
To review which fields you can add to
spec.backup.statefulSet.spec.template.metadata, see the Kubernetes documentation.
spec.backup.statefulSet.spec.template.specタイプ: コレクション
Specifications of the Kubernetes Pods in the StatefulSet that the MongoDB Controllers for Kubernetes Operator creates for the backup daemon service.
To review the complete list of fields you can add to
spec.backup.statefulSet.spec.template.spec, see the Kubernetes documentation.次の例では、
spec.backup.statefulSet.spec.template.specは、MongoDB Controls for Kubernetes Operator が配置する 1 つのバックアップデーモンサービスコンテナの最小と最大の CPU とメモリキャパシティーを定義します。Tip
Ops Manager コンポーネントを**実行する**ホストするのハードウェア、ソフトウェア、およびネットワーク要件の詳細については、Ops Manager ドキュメントの「Ops Manager システム要件」を参照してください。
statefulSet: spec: template: spec: containers: - name: mongodb-backup-daemon resources: requests: cpu: "4" memory: "8Gi" limits: cpu: "8" memory: "16Gi"
spec.backup.statefulSet.spec.template.spec.containersタイプ: コレクション
MongoDB Controls for Kubernetes Operator がバックアップデーモンサービス用に作成するステートメントセット内のKubernetesポッドに属するコンテナのリスト。
To modify the specifications of the backup daemon service container, you must provide the exact name of the container using the
namefield, as shown in the following example:backup: statefulSet: spec: template: spec: containers: - name: mongodb-backup-daemon 注意
spec.backup.statefulSet.spec.template.spec.containersにコンテナを追加すると、Kubernetes Operator はそれらを Kubernetes ポッドに追加します。 これらのコンテナは、ポッド内のバックアップデーモン サービスコンテナに追加されます。
spec.backup.statefulSet.spec.template.spec.containers.resources.requests.cpu型: string
Kubernetes ノード で使用可能である必要がある最小 CPU 容量 バックアップデーモン サービスをホストします。
The requested value must be less than or equal to
spec.backup.statefulSet.spec.template.spec.containers.resources.limits.cpu.
spec.backup.statefulSet.spec.template.spec.containers.resources.limits.cpu型: string
Maximum CPU capacity for the node being created to host the backup daemon service. If omitted, this value is set to
spec.backup.statefulSet.spec.template.spec.containers.resources.requests.cpu.
spec.backup.statefulSet.spec.template.spec.containers.resources.requests.memory型: string
Kubernetes ノード で使用可能である必要がある最小メモリ容量 使用して、Kubernetes で バックアップ デーモン サービス をホストします。この値は、 JEDEC表記では、整数とそれに続くメモリ単位として表されます。
注意
この値は少なくとも
4.5Giに設定します。4.5Gi未満の値ではエラーが発生する可能性があります。The requested value must be less than or equal to
spec.backup.statefulSet.spec.template.spec.containers.resources.limits.memory.
spec.backup.statefulSet.spec.template.spec.containers.resources.limits.memory型: string
Maximum memory capacity for the node being created to host the backup daemon service. If omitted, this value is set to
spec.backup.statefulSet.spec.template.spec.containers.resources.requests.memory.Kubernetes Operator は、コンテナのメモリに基づいて Java ヒープ サイズのパラメータを計算し、設定します。
警告
この値は 32 GB 未満に制限します
この値を 32 GB(
32Gi)を超える値に設定すると、バックアップサービスに問題が発生する可能性があります。 ヒープが過剰な場合、 MongoDB Ops Managerで予期しない結果を引き起こす可能性があります。
S3 設定
Ops Manager は、oplog とバックアップスナップショットの保存に S3 を使用し、カスタム CA によって発行されたキーを使用して TLS によって S3 への接続を保護するように構成できます。
To configure custom CA keys, use the ConfigMap with which you configured TLS for your Application Database as described on the TLS-Encrypted Connection (HTTPS) tab of Deploy an Ops Manager Resource. Set spec.applicationDatabase.security.tls.ca to this ConfigMap.
TLS は、S3 とアプリケーション データベースの両方に使用できます。また、S3 にのみ使用できます。
To use TLS for both, get certificates for both purposes from the same
ca-pemreferenced in the ConfigMap.S3 のみに TLS を使用するには、ConfigMap で
spec.security.applicationDatabase.certsSecretPrefixを定義しないでください。
spec.backup.s3OpLogStores.assignmentLabelsタイプ: 文字列の配列
S3 oplogストアの割り当てラベルのリスト。割り当てラベルを使用して、特定の S3 oplogストアが特定のプロジェクトに関連付けられていることを識別します。 Kubernetes Operator を使用して割り当てラベルを設定すると、割り当てラベルのKubernetes構成ファイルで設定した値が、Ops Manager UIで定義された値を上書きします。 Kubernetes Operator を使用して設定しない割り当てラベルは、 Ops Manager UIで設定された値を引き続き使用します。
spec.backup.s3OpLogStores.customCertificateタイプ: ブール値
Deprecated. Use
spec.backup.s3OpLogStores.customCertificateSecretRefsinstead.S3 oplogストアのカスタム TLS 証明書として AppDB 証明書(
appdb-ca)を使用するかどうかを示すフラグ。デフォルトはFalseです。
spec.backup.s3OpLogStores.customCertificateSecretRefsタイプ: オブジェクトの配列
Kubernetesシークレットを使用した S3 oplogストアのカスタム証明書のリスト。 base64 でエンコードされた x.509 証明書は、キーを持つKubernetesシークレットにすでに存在し、 Java CertificateFactory によって解析可能である必要があります。 1 つのシークレット内で連鎖的に複数の証明書を指定することはできません。 1 つのシークレット内でチェーンに複数の証明書を指定した場合、 Kubernetes Operator はチェーン内の最初の証明書のみを使用します。
customCertificate設定も指定する場合、 Kubernetes Operator はバックアップのカスタム証明書としてspec.applicationDatabase.security.tls.caを使用します。Each entry in the list specifies the
nameand thekey. If you specify multiple secrets, Kubernetes Operator uses all the certificates in the specified secrets.この設定を指定しない場合、MongoDBMongoDB Ops Manager Ops Manager は、 で使用される JVM デフォルトの信頼ストアMongoDB Ops Manager を使用します。
spec.configuration.mms.mongoDbUsage.defaultUsageType型: string
Kubernetes サービスのデフォルトのサーバータイプ。
spec.backup.s3OpLogStores.customCertificateSecretRefs.key型: string
Required to use custom certificates for your S3 oplog store. File that represents the key in the secret that contains the base64-encoded x.509 certificate. If you don't specify this setting, the Kubernetes Operator can't utilize the custom certificate for S3 oplog store backups.
spec.backup.s3OpLogStores.irsaEnabledタイプ: ブール値
AWS EKS のサービス アカウントにAWS IAM ロールを使用して S3 oplogストアを構成することを有効にするフラグ。デフォルトは
Falseです。 AWS EKS を使用していない場合、このフラグは効果がありません。Falseに設定すると、EKS のサービスアカウントのAWS IAM ロールを使用して S3 oplogストアを構成する方法が無効になります。詳しくは、「 EKS のサービス アカウントの IAM ロール 」を参照してください。
spec.backup.s3OpLogStores.name型: string
Required to store the oplog using an S3 store. Name of the S3 oplog store.
spec.backup.s3OpLogStores.mongodbResourceRef.name型: string
S3 oplogストアのメタデータを保存するために作成するMongoDBデータベースリソースの名前。このデータベースリソースは、 Ops Managerリソースと同じ名前空間に配置する必要があります。
注意
この設定を省略すると、アプリケーション データベースを使用して S3 oplogストアのメタデータを保存できます。
If you omit this setting, you must also omit the
spec.backup.s3OpLogStores.mongodbUserRef.namesetting. The Kubernetes Operator handlesSCRAMuser authentication internally.このデータベースで
SCRAM認証を有効にする場合は、次の操作を行う必要があります。をデータベースに接続するための MongoDBユーザー リソースを作成します。MongoDB Ops Manager
Specify the
nameof the user in the Ops Manager resource definition.
spec.backup.s3OpLogStores.mongodbUserRef.name型: string
S3 oplogメタデータを保存するためのMongoDBデータベースリソースを作成し、 かつ このデータベースで SCRAM が有効になっている場合は必須です。 S3 oplogストアのメタデータデータベースに接続するために使用されるMongoDBユーザーリソースの名前。このユーザーリソースをOps Managerリソースと同じ名前空間に、次のすべてのロールを使用して配置します。
重要
Once specified, don't edit the name of the S3 metadata oplog store username.
spec.backup.s3OpLogStores.s3SecretRef.name型: string
spec.backup.s3OpLogStores.irsaEnabledがtrueに設定されていない場合に、S3 ストアを使用してoplogを保存するために必要です。Name of the secret that contains the
accessKeyandsecretKeyfields. The backup daemon service uses the values of these fields as credentials to access your AWS S3 or S3-compatible bucket. To configure the S3 oplog store, you must specify both keys in the secret.spec.backup.s3OpLogStores.irsaEnabledをtrueに設定する場合、 Amazon Web Services S3 の認証情報は pod 環境変数としてマウントされているため、s3SecretRefを設定する必要はありません。
spec.backup.s3OpLogStores.pathStyleAccessEnabledタイプ: ブール値
バケットエンドポイント URL のスタイルを示します。
値説明例trueパス形式 URL
s3.amazonaws.com/<bucket>false仮想ホスト形式の URL
<bucket>.s3.amazonaws.comAmazon Web Servicesの注釈とTLS サポートの詳細については、 Kubernetes のドキュメント を参照してください。
デフォルト値は
trueです。
spec.backup.s3OpLogStores.s3BucketEndpoint型: string
S3 ストアを使用してoplog を保存するために必要です。 oplogストアをホストするAWS S3バケットまたは S3 互換バケットのURL 。
注意
If your endpoint doesn't include a region in its URL, specify the
s3RegionOverridefield.
spec.backup.s3OpLogStores.s3BucketName型: string
S3 ストアを使用してoplog を保存するために必要です。 oplogストアをホストするAWS S3バケットまたは S3 互換バケットの名前。
spec.backup.s3OpLogStores.s3RegionOverride型: string
S3 互換バケットが存在するリージョン。 S3 oplogストアの
s3BucketEndpointがリージョン スコープをサポートしていない場合にのみ、このフィールドを使用します。リージョンのスコープは 、エンドポイントがURLにリージョンを含めていない場合です。このフィールドはAWS S3 バケットでは使用しないでください。詳しくは、「 S3 ブロックストア構成 」を参照してください。
spec.backup.s3Stores.assignmentLabelsタイプ: 文字列の配列
がデータベースバックアップスナップショットを保存する S3 または S3 互換バケットの割り当てラベルのリスト。割り当てラベルを使用して、特定の S3 ストアが特定のプロジェクトに関連付けられていることを識別します。 Kubernetes Operator を使用して割り当てラベルを設定すると、割り当てラベルのKubernetes構成ファイルで設定した値が、Ops Manager UIで定義された値を上書きします。 Kubernetes Operator を使用して設定しない割り当てラベルは、 Ops Manager UIで設定された値を引き続き使用します。
spec.backup.s3Stores.customCertificateタイプ: ブール値
Deprecated. Use
spec.backup.s3Stores.customCertificateSecretRefsinstead.アプリケーション データベースの証明書(
appdb-ca)を S3 バックアップのカスタム TLS 証明書として使用するかどうかを示すフラグ。デフォルトはFalseです。
spec.backup.s3Stores.customCertificateSecretRefsタイプ: オブジェクトの配列
Kubernetesシークレットを使用した S3読み取りのカスタム証明書のリスト。 base64 でエンコードされた x.509 証明書は、キーを持つKubernetesシークレットにすでに存在し、 Java CertificateFactory によって解析可能である必要があります。 1 つのシークレット内で連鎖的に複数の証明書を指定することはできません。 1 つのシークレット内でチェーンに複数の証明書を指定した場合、 Kubernetes Operator はチェーン内の最初の証明書のみを使用します。
spec.backup.s3Stores.customCertificate設定も指定する場合、 Kubernetes Operator はバックアップのカスタム証明書としてspec.applicationDatabase.security.tls.caを使用します。Each entry in the list specifies the
nameand thekey. If you specify multiple secrets, Kubernetes Operator uses all the specified secrets.この設定を指定しない場合、Kubernetes Operator はバックアップに が使用する JVM デフォルトトラストMongoDB Ops Manager ストアを使用します。
spec.backup.s3Stores.customCertificateSecretRefs.name型: string
Required to use custom certificates for your S3 oplog store. Kubernetes secret that contains the custom certificate.
spec.backup.s3Stores.customCertificateSecretRefs.key型: string
Required to use custom certificates for your S3 oplog store. File that represents the key in the secret that contains the base64-encoded x.509 certificate. If you don't specify this setting, Kubernetes Operator can't utilize the custom certificate for S3 snapshot store and defaults to the default trust store used by Ops Manager.
spec.backup.s3Stores.irsaEnabledタイプ: ブール値
Flag that enables using AWS IAM roles for service accounts in AWS EKS to configure an S3 snapshot store. The default is
False. If you aren't using AWS EKS, this flag has no effect. When set toFalse, using AWS IAM roles for service accounts in EKS to configure an S3 snapshot store is disabled. To learn more, see IAM roles for service accounts in EKS.
spec.backup.s3Stores.name型: string
Required to store the oplog using an S3 store. Name of the S3 snapshot store.
重要
Once specified, don't edit the name of the S3 snapshot store. This change will likely fail if backups use the old name. The consequences of a successful change are unpredictable.
spec.backup.s3Stores.mongodbResourceRef.name型: string
S3読み取りのメタデータを保存するために作成する
MongoDBリソースまたはMongoDBMultiClusterリソースの名前。このデータベースリソースは、 Ops Managerリソースと同じ名前空間に配置する必要があります。注意
この設定を省略すると、アプリケーション データベースを使用して S3読み取りのメタデータが保存されます。
If you omit this setting, you must also omit the
spec.backup.s3Stores.mongodbUserRef.namesetting. The Kubernetes Operator handlesSCRAMuser authentication internally.このデータベースで
SCRAM認証を有効にする場合は、次の操作を行う必要があります。をデータベースに接続するための MongoDBユーザー リソースを作成します。MongoDB Ops Manager
Specify the
nameof the user in the Ops Manager resource definition.
重要
Once specified, don't edit the name of the S3 snapshot store. This change will likely fail if backups use the old name. The consequences of a successful change are unpredictable.
この名前の MongoDB database リソースが存在しない場合、
backupリソースはPending状態になります。 Kubernetes Operator は、この名前の MongoDB database リソースが作成されるまで、10 秒ごとに再試行します。注意
この設定で参照するデータベース リソースにセキュリティを変更すると、 Kubernetes Operator はMongoDB Ops Managerリソースの調整を自動的に開始します。 Kubernetes Operator は、 の変更に基づいてMongoDB Ops Manager構成の
mongoUriフラグとsslフラグを更新します。
spec.backup.s3Stores.mongodbUserRef.name型: string
|s3| を保存するためのMongoDBデータベースリソースを作成した場合に必要このデータベースでは、スナップショットメタデータと SCRAM が有効になっています。 S3読み取りのメタデータデータベースに接続するために使用されるMongoDBユーザーリソースの名前。このユーザーリソースをOps Managerリソースと同じ名前空間に、次のすべてのロールを使用して配置します。
重要
Once specified, don't edit the name of the S3 metadata snapshot store username.
spec.backup.s3Stores.s3SecretRef.name型: string
S3 ストアを使用してバックアップを有効にし、かつ
spec.backup.s3Stores.irsaEnabledをtrueに設定していない場合に必要です。Name of the secret that contains the
accessKeyandsecretKeyfields. The backup daemon service uses the values of these fields as credentials to access your AWS S3 or S3-compatible bucket. The S3 snapshot store can't be configured if the secret is missing either key.spec.backup.s3Stores.irsaEnabledをtrueに設定する場合、 Amazon Web Services S3 の認証情報は pod 環境変数としてマウントされているため、s3SecretRefを設定する必要はありません。
spec.backup.s3Stores.pathStyleAccessEnabledタイプ: ブール値
バケットエンドポイント URL のスタイルを示します。
値説明例trueパス形式 URL
s3.amazonaws.com/<bucket>false仮想ホスト形式の URL
<bucket>.s3.amazonaws.comデフォルト値は
trueです。
spec.backup.s3Stores.s3BucketEndpoint型: string
S3 ストアを使用してバックアップを有効にする場合は必須です。読み取りをホストするAWS S3バケットまたは S3 互換バケットのURL 。
注意
If your endpoint doesn't include a region in its URL, specify the
s3RegionOverridefield.
spec.backup.s3Stores.s3BucketName型: string
S3 ストアを使用してバックアップを有効にする場合は必須です。読み取りをホストするAWS S3バケットまたは S3 互換バケットの名前。
spec.backup.s3Stores.s3RegionOverride型: string
S3 互換バケットが存在するリージョン。このフィールドは、S3 ストアの
s3BucketEndpointがリージョン スコープをサポートしていない場合にのみ使用します。リージョンのスコープは 、エンドポイントがURLにリージョンを含めていない場合です。Don't use this field with AWS S3 buckets. For more information, see S3 Blockstore Configuration.
アプリケーションデータベースに必要な設定
このセクションでは、 を構成するために、 必要なMongoDB Ops Manager 設定Ops Manager Application Database に加えて使用する必要がある設定について説明します。
spec.applicationDatabase.version型: string
必須。 Ops Manager Application Database にインストールされているMongoDBのバージョン。コンテナレジストリの タグに基づいて、互換性のあるエンタープライズMongoDBバージョンを指定する必要があります。例、
8.0.0-ubi8。 Kubernetes Operator1 バージョン.20 以降、タグは-entで終わることがなくなりました。重要
互換性のある MongoDB Server バージョンを選択していることを確認してください。
互換性のあるバージョンは、MongoDB database リソースが使用する基本イメージによって異なります。
注意
If you update this value to a later version of MongoDB for the Application Database, the feature compatibility version remains at the MongoDB version you're upgrading from to give you the option to downgrade if necessary. If you want the feature compatibility version to match the new MongoDB version, you must manually set the
featureCompatibilityVersionparameter underspec.applicationDatabase.
アプリケーションデータベースの任意設定
このセクションでは、Ops Manager Application Database に関連するオプションの設定について説明します。 MongoDB Ops Managerのマルチクラスター配置に固有のオプションのアプリケーション データベース設定については、「マルチクラスター設定 」を参照してください。
spec.applicationDatabaseタイプ: コレクション
MongoDB Ops Manager Application Databaseリソースの定義。
レプリカセットリソース仕様の次の設定は任意です。
spec.applicationDatabase.agent.logLevel型: string
デフォルト: INFO
ポッド内でのオートメーションエージェントのログ記録のレベルを構成します。受け入れ可能な値は以下の通りです。
DEBUGINFOWARNERRORFATAL
spec.applicationDatabase.agent.<component>.logRotate型: オブジェクト
コンポーネントを次のいずれかの値に置き換えます。
mongodmonitoringAgent
MongoDB configuration object for rotating the MongoDB logs of a process. To use the
agent.<component>.logRotatesettings, you must setsystemLog.destinationtofilebecause you can't use theagent.<component>.logRotatesettings if you're writing logs to the host's syslog system.注意
If the size of files the Ops Manager dashboard generates is larger than the storage space available in the
emptyDirvolume, consider overriding theemptyDirvolume with a Persistent Volume to prevent pod crashes. To learn more, seespec.statefulSet.spec.template.spec.volumes.
spec.applicationDatabase.agent.mongod.logRotate.numTotalタイプ: 整数
デフォルト:
0Total number of log files that Ops Manager retains. If you don't change the default, Ops Manager bases rotation on your other
agent.<compenet>.logRotatesettings.
spec.applicationDatabase.agent.mongod.logRotate.numUncompressedタイプ: 整数
デフォルト:
5現在のログファイルを含む、非圧縮のままにするログファイルの最大数。
spec.applicationDatabase.agent.mongod.logRotate.percentOfDiskspaceタイプ: 数値
デフォルト:
0.02MongoDB Ops Managerがログファイルを保存するために使用できる合計ディスク領域の最大パーセンテージは小数で表されます。 この制限を超えた場合、 MongoDB Ops Managerは、この制限を満たすまで圧縮されたログファイルを削除します。 MongoDB Ops Managerは、最も古いログファイルを最初に削除します。
spec.applicationDatabase.agent.<component>.logRotate.sizeThresholdMBタイプ: 数値
コンポーネントを次のいずれかの値に置き換えます。
mongodmonitoringAgent
Required if rotating logs. Maximum size in MB for an individual log file before Ops Manager rotates it. Ops Manager rotates the log file immediately if it meets the value given in either this
sizeThresholdMBor thelogRotate.timeThresholdHrslimit.
spec.applicationDatabase.agent.<component>.logRotate.timeThresholdHrsタイプ: 整数
コンポーネントを次のいずれかの値に置き換えます。
mongodmonitoringAgent
Required if rotating logs. Maximum duration in hours for an individual log file before the next rotation. The time is since the last rotation. Ops Manager rotates the log file immediately if it meets the value given in either
timeThresholdHrsor thelogRotate.sizeThresholdMlimit.
spec.applicationDatabase.agent.mongod.auditlogRotate型: オブジェクト
プロセスの MongoDB 監査ログをローテーションするための MongoDB 構成オブジェクト 。
spec.applicationDatabase.agent.mongod.auditlogRotate.numTotalタイプ: 整数
デフォルト:
0Total number of audit log files that Ops Manager retains. If you don't change the default value, Ops Manager bases rotation on your other
agent.mongod.auditlogRotatesettings.
spec.applicationDatabase.agent.mongod.auditlogRotate.numUncompressedタイプ: 整数
デフォルト:
5現在の監査ログファイルを含む、非圧縮のままにする監査ログファイルの最大数。
spec.applicationDatabase.agent.mongod.auditlogRotate.percentOfDiskspaceタイプ: 数値
デフォルト:
0.02MongoDB Ops Managerが監査ログファイルを保存するために使用できる合計ディスク領域の最大パーセンテージ(小数で表されます)。 この制限を超えると、 MongoDB Ops Managerはこの制限を満たすまで圧縮された監査ログファイルを削除します。 MongoDB Ops Managerは、最も古いログファイルを最初に削除します。
spec.applicationDatabase.agent.mongod.auditlogRotate.sizeThresholdMBタイプ: 数値
Required if rotating audit logs. Maximum size in MB for an individual audit log file before Ops Manager rotates it. Ops Manager rotates the audit log file immediately if it reaches the value in either
sizeThresholdMBor theauditlogRotate.timeThresholdHrslimit.
spec.applicationDatabase.agent.mongod.auditlogRotate.timeThresholdHrsタイプ: 整数
Required if rotating audit logs. Maximum duration in hours for an individual audit log file before the next rotation. The time is since the last rotation. Ops Manager rotates the audit log file immediately if it reaches the value in either
timeThresholdHrsor theauditlogRotate.sizeThresholdMlimit.
spec.applicationDatabase.agent.startupOptions型: オブジェクト
スタートアップ オプション用の MongoDB 構成オブジェクト 。 使用可能なフィールドについては、「 MongoDB Agent 設定」を参照してください。
spec.applicationDatabase.agent.systemLog.path型: string
デフォルト:
/var/log/mongodb-mms-automation/mongodb.logThe path of the log file to which
mongodormongosshould send all diagnostic logging information, rather than the standard output or the host's syslog. MongoDB creates the log file at the specified path.Linux パッケージ初期化スクリプトでは、
systemLog.pathがデフォルトから変更されることは想定されていません。 Linux パッケージを使用してsystemLog.pathを変更する場合は、独自の初期化スクリプトを使用し、組み込みスクリプトを無効にする必要があります。
spec.applicationDatabase.agent.systemLog.logAppendタイプ: ブール値
デフォルト:
falseWhen
true,mongosormongodappends new entries to the end of the existing log file when themongosormongodinstance restarts. Without this option,mongodwill back up the existing log and create a new file.
spec.applicationDatabase.agent.systemLog.destination型: string
The destination to which MongoDB sends all log output. Specify either
fileorsyslog. If you specifyfile, you must also specifysystemLog.path.If you don't specify
systemLog.path, MongoDB sends all log output to standard output.警告
syslog デーモンは、MongoDB によりメッセージが発行されたときではなく、メッセージがログに記録されたときにタイムスタンプを生成します。 この動作により、特にシステムの負荷が高い場合に、ログエントリのタイムスタンプに誤りが生じる可能性があります。 タイムスタンプが正確になるように、実稼働システムでは
fileオプションを使用することをお勧めします。
spec.applicationDatabase.externalAccessタイプ: コレクション
クラスターを外部接続用に公開するための仕様。Kubernetesクラスターの外部からMongoDBリソースに接続する方法については、Kubernetes の外部からMongoDB Database に接続する を参照してください。
spec.externalAccessを追加すると、Kubernetes Operator はレプリカセット内の各ポッドの外部サービスを作成します。 外部サービスは、クラスター内の各 MongoDB database ポッドの外部エントリ ポイントを提供します。 各外部サービスには セレクター があります は、外部サービスを特定のポッドに一致させます。値なしでこの設定を追加すると、Kubernetes Operator は次のデフォルト値を持つ外部サービスを作成します。
フィールド値説明Name<pod-name>-svc-external外部サービスの名前。 この値は変更できません。
TypeLoadBalancer外部 LoadBalancer を作成します service
Port<Port Number>A port for
mongod.publishNotReadyAddresstrueSpecifies that DNS records are created even if the Pod isn't ready. Do not set to
falsefor any database Pod.
spec.externalAccess.externalServiceタイプ: コレクション
spec.externalAccessのデフォルト値を上書きするための指定。spec.externalAccess設定を設定すると、 Kubernetes Operator は デフォルト値 の外部ロードバランサーサービスを自動的に作成します。ニーズに応じて、特定の値を上書きしたり、新しい値を追加したりできます。例、NodePort サービスを作成し、ロードバランサーが必要ない場合は、 Kubernetes仕様でオーバーライドを構成する必要があります。externalAccess: externalService: annotations: # cloud-specific annotations for the service spec: type: NodePort # default is LoadBalancer # you can specify other spec overrides if necessary Kubernetes仕様の詳細については、Kubernetesドキュメントの ServiceSpec を参照してください。
spec.externalAccess.externalService.annotationsタイプ: コレクション
配置内のすべてのクラスターにクラウドプロバイダー固有の構成設定を追加できるキーと値のペア。詳しくは、 「 Kubernetesクラウドプロバイダー 」の注釈とドキュメントを参照してください。
注釈 を使用して、 Kubernetes Operator 配置で使用される外部サービスのプレースホルダー値を指定できます。Kubernetes Operator は、これらの値を次の表に記載されている正しい値に自動的に置き換えます。プレースホルダーを使用すると、特定のポッドの各サービスに特定の注釈を提供できます。
値説明{resourceName}{namespace}{podIndex}StateftSet によって割り当てられ、現在の外部サービスが対象とする ポッドのインデックス。
{podName}{resourceName}-{podIndex}に等しい。{statefulSetName}The StatefulSet. Equal to
{resourceName}.{externalServiceName}指定したプレースホルダー値に基づいて、外部サービスの生成された名前。
{resourceName}-{podIndex}-svc-externalに等しい。{mongodProcessDomain}The domain name of the server that is hosting the mongod process. Equal to
spec.externalAccess.externalDomainif specified. Otherwise, equal to the domain used for themongodprocess FQDN.たとえば、プロセス ホスト名
mdb-rs-1.example.comの場合、example.comはドメイン名になります。{mongodProcessFQDN}The
mongodprocess hostname set in the automation configuration.プロセス ホスト名は、配置構成によって異なります。
external domainsを使用するように配置を構成した場合、プロセス ホスト名は次の形式を使用します。{resourceName}-{podIndex}.{mongodProcessDomain}以下に例を挙げます。
mdb-rs-1.example.com配置で外部ドメインを使用しない場合、プロセス ホスト名は次の形式を使用します。
{resourceName}-{podIndex}.{resourceName}-{podIndex}-svc.{namespace}.svc.cluster.local以下に例を挙げます。
mdb-rs-1.mdb-rs-1-svc.ns.svc.cluster.local注意
表に指定されている既知のプレースホルダー値のみを使用し、プレースホルダーが空または null 値を使用しないようにする必要があります。 また、単一の MongoDB リソース配置では、複数の Kubernetes クラスター配置に固有のプレースホルダーを使用することもできません。
それ以外の場合、Kubernetes Operator はエラーを返します。 たとえば、次のエラーメッセージが表示される場合があります。
error replacing placeholders in map with key=external-dns.alpha.kubernetes.io/hostname, value={resourceName}-{podIndex}-{unknownPlaceholder}.{clusterName}-{clusterIndex}.example.com: missing values for the following placeholders: {clusterName}, {clusterIndex}, {unknownPlaceholder}`` 例
次の例えでは、
{resourceName}、{podIndex}、{namespace}プレースホルダーを指定します。apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: mdb-rs namespace: ns spec: replicas: 3 externalAccess: externalService: annotations: external-dns.alpha.kubernetes.io/hostname: {resourceName}-{podIndex}-{namespace}.example.com Kubernetes Operator は、各プレースホルダーの適切な値に基づいて、外部サービスの注釈を自動的に入力します。 例:
mdb-rs-0-svc-external: annotations: external-dns.alpha.kubernetes.io/hostname: mdb-rs-0-ns.example.com mdb-rs-1-svc-external: annotations: external-dns.alpha.kubernetes.io/hostname: mdb-rs-1-ns.example.com mdb-rs-2-svc-external: annotations: external-dns.alpha.kubernetes.io/hostname: mdb-rs-2-ns.example.com
spec.externalAccess.externalService.specタイプ: コレクション
Configuration for the ServiceSpec. To learn more, see
spec.externalAccess.externalService.
spec.applicationDatabase.memberConfigタイプ: オブジェクトの配列
MongoDB Ops Manager配置内の各アプリケーション データベース レプリカセット ノードの仕様。
重要
If you set
spec.topologytoMultiCluster, usespec.applicationDatabase.clusterSpecList.memberConfiginstead ofspec.applicationDatabase.memberConfig. In a multi-cluster Ops Manager deployment, the Kubernetes Operator ignores all parameters underspec.applicationDatabase.memberConfig.memberConfigリスト内の要素数はspec.applicationDatabase.membersと等しくなければなりません。memberConfigリスト内の要素の順序は、レプリカセット内のメンバーの順序を反映する必要があります。 たとえば、 配列の最初の要素はインデックス0の ポッドに影響し、2 番目の要素はインデックス1に影響するなどします。例
アプリケーション データベースの 3 つのノードからなるレプリカセットの次の指定例を検討してみましょう。
spec: applicationDatabase: memberConfig: - votes: 1 priority: "0.5" tags: tag1: "value1" environment: "prod" - votes: 1 priority: "1.5" tags: tag2: "value2" environment: "prod" - votes: 0 priority: "0" tags: tag2: "value2" environment: "prod"
spec.applicationDatabase.memberConfig.priority型: string
アプリケーション データベースのレプリカセットがプライマリ になる相対的な可能性を示す数値。
レプリカセット メンバーがプライマリになる相対的な可能性を高めるには、
priorityの値を高く指定します。レプリカセット メンバーがプライマリになる相対的な可能性を減らすには、
priorityの値を低く指定します。
たとえば、
memberConfig.priorityが1.5のメンバーは、memberConfig.priorityが0.5のメンバーよりも多く、プライマリになる可能性が高くなります。かつ
memberConfig.priorityが0のノードはプライマリになる資格がありません。 詳しくは、「メンバーの優先順位 」を参照してください。
spec.applicationDatabase.memberConfig.tagsタイプ: map
アプリケーション データベース レプリカセットの特定のノードに読み取りおよび書込み (write) 操作を指示するためのレプリカセット タグのマップ。
spec.applicationDatabase.memberConfig.votesタイプ: 数値
Determines whether an Application Database replica set member can vote in an election. Set to
1to allow the member to vote. Set to0to exclude the member from an election.
spec.applicationDatabase.passwordSecretKeyRef.name型: string
MongoDB Ops Manager データベース ユーザー
mongodb-ops-managerのパスワードを含むシークレットの名前。 MongoDB Ops Manager はこのパスワードを使用して、アプリケーション データベースに認証します。
spec.applicationDatabase.passwordSecretKeyRef.key型: string
MongoDB Ops Manager データベース ユーザー
mongodb-ops-managerのパスワードを含むシークレット内のフィールドの名前。 MongoDB Ops Manager はこのパスワードを使用して、アプリケーション データベースに認証します。デフォルト値は
passwordです。
spec.applicationDatabase.security.certsSecretPrefix型: string
Text to prefix to the Kubernetes secret that you created that contains your Application Database's TLS key and certificate.
シークレットには
<prefix>-<metadata.name>-db-certという名前を付ける必要があります。MongoDB Ops ManagerインスタンスをHTTPS 経由で実行するように構成する方法については、「 MongoDB Ops Managerリソースの配置 」を参照してください。
spec.applicationDatabase.security.tls.ca型: string
Name of the Kubernetes ConfigMap containing the CA file for the Application Database.
重要
spec.applicationDatabase.security.tls.cais required if you use a custom CA to sign your Application Database's TLS certificates.Kubernetes Operator では、ConfigMap でアプリケーション データベースの証明書
ca-pemに名前を付ける必要があります。The CA specified in this section is also used for configuring custom TLS certificates for S3 storage when either
spec.backup.s3OpLogStores.customCertificateorspec.backup.s3Stores.customCertificateare set totrue.このCAは、次の証明書に署名します。
アプリケーション データベースのレプリカセットのノードは相互に通信するために使用し、
MongoDB Ops Manager は を使用して Application Database レプリカセットと通信します。
警告
You must concatenate your custom CA file and the entire TLS certificate chain from
downloads.mongodb.comto prevent Ops Manager from becoming inoperable if the application database restarts.
spec.applicationDatabase.security.tls.enabled重要
spec.security.applicationDatabase.tls.enabledis deprecated and will be removed in a future release. To enable TLS, provide a value for thespec.security.applicationDatabase.certsSecretPrefixsetting.MongoDB Ops Manager とアプリケーション データベース間のTLS証明書を使用して通信を暗号化します。
Prometheus 設定
アプリケーション データベースで Prometheus を使用する場合、次の設定が適用されます。
spec.applicationDatabase.prometheus.metricsPath型: string
デフォルト:
"/metrics"任意。 メトリクス エンドポイントへのパスを示す、人間が判読可能なstring 。 この設定を指定しない場合、デフォルトが適用されます。
spec.applicationDatabase.prometheus.passwordSecretRef型: オブジェクト
Conditional Object that contains the details of the secret for basic HTTP authentication. If you want to use Prometheus with your Application Database, you must specify this setting.
spec.applicationDatabase.prometheus.passwordSecretRef.key型: string
デフォルト:
"password"Optional. Human-readable string that identifies the key in the secret that stores the password for basic HTTP authentication. If you don't specify this setting, the default applies.
spec.applicationDatabase.prometheus.passwordSecretRef.name型: string
条件付き
基本的なHTTP認証のパスワードを含むシークレットを識別する、人間が判読可能なラベル。アプリケーション データベースで Prometheus を使用する場合は、この設定を指定する必要があります。
spec.applicationDatabase.prometheus.portタイプ: 整数
デフォルト: 9216
任意。 メトリクス エンドポイントがバインドするポートを識別する番号。 この設定を指定しない場合、デフォルトが適用されます。
spec.applicationDatabase.prometheus.tlseSecretKeyRef型: オブジェクト
Optional. Object that contains the details of the secret for TLS authentication.
spec.applicationDatabase.prometheus.tlseSecretKeyRef.key型: string
デフォルト:
"password"Optional. Human-readable string that identifies the key in the secret that stores the password for TLS authentication. If you don't specify this setting, the default applies.
spec.applicationDatabase.prometheus.tlseSecretKeyRef.name型: string
Conditional. Human-readable label that identifies the secret that contains the password for TLS authentication. If you want to use Prometheus with your Application Database and you want to use TLS authentication, you must specify this setting.
マルチクラスター設定
MongoDB Ops Managerの必要設定
このセクションでは、必要な MongoDB Ops Manager 設定に加えて、マルチクラスターMongoDB Ops Manager配置に使用する必要がある設定について説明しMongoDB Ops Manager 。
spec.clusterSpecList.membersタイプ: 整数
Conditional. The number of Ops Manager members in the Ops Manager cluster in a multi-Kubernetes cluster MongoDB deployment. When you set
spec.topologytoMultiCluster, you must specify the value for this parameter. Omit this parameter for single-cluster deployments. If you set this parameter to zero, this removes this Ops Manager member cluster from the list of member clusters in the multi-Kubernetes cluster of Ops Manager instances.
spec.topology型: string
KubernetesリソースのMongoDB Ops Manager 配置のタイプ。
値は
SingleClusterまたはMultiClusterです。 省略した場合、デフォルト値はSingleClusterです。MultiClusterを指定した場合MongoDBMultiClusterリソースを監視対象リソース リストに追加します。 これは、Kubernetes Operator に、マルチ Kubernetes クラスター モードで動作し、マルチ Kubernetes リソースの処理に必要な構成アクションを実行する必要があることを示します。Specify at least one member cluster on which you want to deploy Ops Manager, using
spec.clusterSpecListand its nestedspec.clusterSpecList.clusterNameandspec.clusterSpecList.membersparameters.MultiClusterを指定すると、Kubernetes Operator はspec.membersに設定した値を無視します。 リソース仕様の例を参照してください。
MongoDB Ops Manager任意設定
MongoDB Ops Managerのリソースでは、マルチクラスターのMongoDB Ops Manager配置に固有の次の設定も使用できます。
spec.clusterSpecListタイプ: コレクション
条件付き。 またはバックアップデーモン Kubernetesインスタンスを配置する予定の複数のKubernetes クラスターで、選択した ノード クラスターの詳細。MongoDB Ops Managerリソース仕様の例も参照してください。
When you set
spec.topologytoMultiCluster, you must specify the value forspec.clusterSpecList.members. All other parameters underspec.clusterSpecListare optional.When you set
spec.topologytoSingleCluster, the Kubernetes Operator ignores all parameters underspec.clusterSpecList.
spec.clusterSpecList.clusterName型: string
任意 。MongoDB Ops Managerまたはバックアップデーモンの ステートメントをスケジュールするMongoDBのマルチKubernetesクラスターMongoDBデプロイ内のメンバーの名前。
spec.clusterSpecList.clusterDomain型: string
Optional. An override for
spec.clusterDomainfor the specific Ops Manager member cluster. If you omit this value, defaults to the value set inspec.clusterDomain. Kubernetes assigns each Pod a FQDN. The Kubernetes Operator calculates the FQDN for each Pod using a providedclusterDomainvalue. Kubernetes doesn't provide an API to query these hostnames.
spec.clusterSpecList.configurationタイプ: コレクション
Optional. Ops Manager configuration properties that override properties you set in
spec.configurationfor the specific cluster. See Ops Manager Configuration Settings for property names and descriptions. Each property takes a value of typestring. For example, setting these properties allows you to change environment variables that you must pass to Ops Manager and the Backup Daemon in that particular member cluster.If you omit specifying values, defaults to the values set in
spec.configuration.
spec.clusterSpecList.jvmParametersタイプ: 文字列の配列
任意。 このノード クラスターの MongoDB Ops Manager インスタンスとバックアップデーモン インスタンスに渡されるJVMパラメーター。
If you specify this parameter, its values override the values specified in
spec.jvmParameters. For example values, see the example of the resource specification.If you omit this parameter, values from the
spec.jvmParametersare used for the Ops Manager and Backup Daemon instances in this member cluster.
spec.clusterSpecList.externalConnectivityタイプ: コレクション
Optional. Configuration object that enables external connectivity to Ops Manager for the specific cluster. This is an override for
spec.externalConnectivityfor the specific cluster.MongoDB Ops Managerアプリケーションがさまざまなクラスターで外部に公開される方法を変更するには、このパラメーターの値を指定します。 たとえば、異なるクラウドプロバイダーのMongoDB Ops Manager Kubernetesノードに配置する場合は、このパラメーターにクラウドプロバイダー固有の値を指定する必要がある場合があります。
このパラメーターを設定すると、次の効果が生じます。
The Kubernetes Operator doesn't use
spec.externalConnectivityvalues for this member Ops Manager cluster.The Kubernetes Operator creates a Kubernetes service, named
<om-name>-svc-ext, that allows traffic originating from outside of the Kubernetes cluster to reach the Ops Manager application on this member cluster.
If you omit this parameter, the Kubernetes Operator uses values from
spec.externalConnectivityfor this member cluster.
spec.clusterSpecList.statefulSet.specタイプ: コレクション
Optional. Specification for the StatefulSet that the MongoDB Controllers for Kubernetes Operator creates for a specific member cluster in the multi-Kubernetes cluster Ops Manager deployment. This parameter is an override for
spec.statefulSet.spec. If you omit it, the Kubernetes Operator uses the values fromspec.statefulSet.spec. For example, you can use this parameter to specify different storage values for each of your Ops Manager clusters in the multi-Kubernetes cluster MongoDB deployment.To review which fields you can add to
spec.clusterSpecList.statefulSet.spec, see StatefulSetSpec v1 apps in the Kubernetes documentation.
spec.clusterSpecList[*].backup任意。 その特定のノード クラスターの
spec.backupで指定された値を上書きするバックアップ設定。You can set these values only if
spec.backup.enabledis set totrue.このパラメータの値を設定しない場合、デフォルトは
spec.backupの下の設定で指定された値になります。このオーバーライドでは、すべてのバックアップ設定がサポートされていません。 次のバックアップ設定は、
spec.backupで指定されている場合、すべてのノード クラスターにグローバルに適用されるため、上書きできません。externalServiceEnabledheadDBopLogStoresblockStoress3StoresfileSystemStoresqueryableBackupSecretRefencryption
spec.clusterSpecList[*].backup.membersタイプ: 整数
Optional. Override for
spec.backup.members. The number of Backup Daemon instances to deploy in this cluster. if you omit this value or provide a value of0, the Kubernetes Operator won't deploy Backup Daemon instances in a particular member cluster.
spec.clusterSpecList[*].backup.assignmentLabelsタイプ: 文字列の配列
Optional. Override for
spec.backup.assignmentLabels. If specified, the Kubernetes Operator uses the values you specify in this override for all Backup Daemon instances in a particular member cluster. If you omit values for this parameter, the values default to those specified inspec.backup.assignmentLabelsfor all Backup Daemon instances in a member cluster.
spec.clusterSpecList[*].backup.jvmParametersタイプ: 文字列の配列
Optional. Override for
spec.backup.jvmParameters. Allows you to customize the JVM value for Backup Daemon instances in a particular member cluster.
spec.clusterSpecList[*].backup.statefulSet型: string
任意。 の をオーバーライドします。特定のノードクラスター内のバックアップデーモンの
spec.backup.statefulSet.spec値をカスタマイズできます。spec.clusterSpecList[*].backup.statefulSetに追加できるフィールドを確認するには、 Kubernetesドキュメントの「StateulSetSpec v1 アプリ」を参照してください。
アプリケーションデータベースに必要な設定
このセクションでは、アプリケーション データベースで使用する必要があるマルチクラスターMongoDB Ops Manager配置に固有の設定について説明します。
spec.applicationDatabase.clusterSpecListタイプ: コレクション
MongoDB のマルチ Kubernetes クラスター配置で、アプリケーション データベースをホストするノードとして機能する選択した Kubernetes ノード クラスターの詳細。
spec.applicationDatabase.clusterSpecList.clusterName型: string
MongoDB Controls for Kubernetes Operator がアプリケーション データベースのステートメントをスケジュールする MongoDB のマルチ Kubernetes クラスターMongoDBデプロイ内の、メンバーのKubernetesクラスターの名前。
重要
You can't convert a single cluster Ops Manager instance to a multi-Kubernetes cluster MongoDB deployment instance by modifying the
topologyand theclusterSpecListsettings in the CRD.
spec.applicationDatabase.clusterSpecList.membersタイプ: 数値
指定されたノード クラスター内のステートメント ノードの数。 ノードクラスターは、Kubernetes クラスターの MongoDB 配置でアプリケーション データベースをホストするノード クラスターの 1 つです。
spec.applicationDatabase.topology型: string
アプリケーション データベースの Kubernetes 配置のタイプ。
値は
SingleClusterまたはMultiClusterです。 省略した場合、デフォルト値はSingleClusterです。MultiClusterを指定する場合は、少なくとも 1 つのメンバーを指定する必要がありますcluster on which you want to deploy the Application Database using the
clusterSpecList,clusterName,membersparameters.MultiClusterを指定すると、Kubernetes Operator はspec.applicationDatabase.membersフィールドに設定した値を無視します。
アプリケーションデータベースの任意設定
このセクションでは、アプリケーション データベースで使用できるマルチクラスターMongoDB Ops Manager配置に固有の設定について説明します。
spec.applicationDatabase.clusterSpecList.externalAccess型: string
レプリカセットの配置を外部で公開するために使用される外部ドメイン。
By default, each replica set member uses the Kubernetes Pod's FQDN (
*.svc.cluster.local) as the default hostname. However, if you add an external domain to this setting, the replica set uses a hostname that is a subdomain of the specified domain instead. This hostname uses the following format:<replica-set-name>-<cluster-idx>-<pod-idx>.<externalDomain>以下に例を挙げます。
multi-replica-set-0-1.cluster-0.example.com重要
この設定は、 サービス メトリクスなしで Application Database 配置を配置する場合にのみ使用します。「 サービス メッシュのないマルチクラスターMongoDB Ops Manager 」を参照してください。
spec.applicationDatabase.clusterSpecList.memberConfigタイプ: 文字列の配列
マルチクラスターMongoDB Ops Manager配置内の各アプリケーション データベース レプリカセット ノードの仕様。
重要
If you set
spec.topologytoSingleCluster, usespec.applicationDatabase.memberConfiginstead ofspec.applicationDatabase.clusterSpecList.memberConfig.The number of elements in the
memberConfiglist must equalspec.applicationDatabase.clusterSpecList.members.memberConfigリスト内の要素の順序は、レプリカセット内のメンバーの順序を反映する必要があります。 たとえば、 配列の最初の要素はインデックス0の ポッドに影響し、2 番目の要素はインデックス1に影響するなどします。例
アプリケーション データベースの 3 つのノードからなるレプリカセットの次の指定例を検討してみましょう。
spec: replicas: 3 version: 8.0.0 backup: enabled: true storage: resources: requests: storage: 10Gi storageClassName: standard applicationDatabase: clusterSpecList: - name: appdb members: 3 memberConfig: - votes: 1 priority: "0.5" tags: tag1: "value1" environment: "prod" - votes: 1 priority: "1.5" tags: tag2: "value2" environment: "prod" - votes: 0 priority: "0" tags: tag2: "value2" environment: "prod"
spec.applicationDatabase.clusterSpecList.memberConfig.priority型: string
アプリケーション データベースのレプリカセットがプライマリ になる相対的な可能性を示す数値。
レプリカセット メンバーがプライマリになる相対的な可能性を高めるには、
priorityの値を高く指定します。レプリカセット メンバーがプライマリになる相対的な可能性を減らすには、
priorityの値を低く指定します。
たとえば、
memberConfig.priorityが1.5のメンバーは、memberConfig.priorityが0.5のメンバーよりも多く、プライマリになる可能性が高くなります。かつ
memberConfig.priorityが0のノードはプライマリになる資格がありません。 詳しくは、「メンバーの優先順位 」を参照してください。
spec.applicationDatabase.clusterSpecList.memberConfig.tagsタイプ: map
アプリケーション データベース レプリカセットの特定のノードに読み取りおよび書込み (write) 操作を指示するためのレプリカセット タグのマップ。
spec.applicationDatabase.clusterSpecList.memberConfig.votesタイプ: 数値
Determines whether an Application Database replica set member can vote in an election. Set to
1to allow the member to vote. Set to0to exclude the member from an election.