Kubernetes 演算子は X. 509 、 LDAP、およびSCRAMユーザー認証。
注意
LDAP 構成については、 spec.security.authentication.agents.automationLdapGroupDN
設定を参照してください。
You must create an additional CustomResourceDefinition for your MongoDB users and the MongoDB Agent instances. The Kubernetes Operator generates and distributes the certificate.
認証サンプルディレクトリの x509 認証ディレクトリにある完全な X.509 証明書構成例を参照してください。このディレクトリには、サンプルLDAP および SCRAM 構成も含まれています。
配置例 CRD
1 apiVersion: mongodb.com/v1 2 kind: MongoDB 3 metadata: 4 name: my-tls-enabled-rs 5 spec: 6 type: ReplicaSet 7 members: 3 8 version: "8.0.0" 9 opsManager: 10 configMapRef: 11 name: my-configmap-name 12 credentials: my-credentials 13 security: 14 tls: 15 enabled: true 16 authentication: 17 enabled: true 18 modes: ["X509"] 19 internalCluster: "X509"
ユーザー CRD の例
1 apiVersion: mongodb.com/v1 2 kind: MongoDBUser 3 metadata: 4 name: user-with-roles 5 spec: 6 username: "CN=mms-user-1,OU=cloud,O=MongoDB,L=New York,ST=New York,C=US" 7 db: "$external" 8 mongodbResourceRef: 9 name: my-resource 10 roles: 11 - db: "admin" 12 name: "clusterAdmin"