MongoDB Ops Manager 데이터 백업, 데이터베이스 성능 모니터링 등과 같은 워크로드를 원활하게 처리하는 역할을 합니다. 멀티 클러스터 MongoDB Ops Manager 및 애플리케이션 데이터베이스 배포서버 전체 데이터 센터 또는 구역 장애에 대해 복원력 있게 만들려면 MongoDB Ops Manager 애플리케이션 및 애플리케이션 데이터베이스를 여러 Kubernetes 클러스터에 배포 .
전제 조건
다음 절차를 시작하기 전에 다음 조치를 수행하세요.
kubectl설치.GKE 클러스터 절차 또는 이에 상응하는 절차를 완료합니다.
TLS 인증서 절차 또는 이에 상응하는 절차를 완료합니다.
Istio 서비스 메시 절차 또는 이에 상응하는 절차를 완료합니다.
MongoDB 연산자 배포 절차를 완료합니다.
다음과 같이 필수 환경 변수를 설정합니다.
# This script builds on top of the environment configured in the setup guides. # It depends (uses) the following env variables defined there to work correctly. # If you don't use the setup guide to bootstrap the environment, then define them here. # ${K8S_CLUSTER_0_CONTEXT_NAME} # ${K8S_CLUSTER_1_CONTEXT_NAME} # ${K8S_CLUSTER_2_CONTEXT_NAME} # ${OM_NAMESPACE} # Defaults for the test RustFS S3 storage. # If you use your own S3 storage - override any of these. export S3_OPLOG_BUCKET_NAME="${S3_OPLOG_BUCKET_NAME:-s3-oplog-store}" export S3_SNAPSHOT_BUCKET_NAME="${S3_SNAPSHOT_BUCKET_NAME:-s3-snapshot-store}" export S3_ENDPOINT="${S3_ENDPOINT:-rustfs.rustfs.svc.cluster.local}" export S3_ACCESS_KEY="${S3_ACCESS_KEY:-rustfsadmin}" export S3_SECRET_KEY="${S3_SECRET_KEY:-rustfsadmin123}" export OPS_MANAGER_VERSION="8.0.5" export APPDB_VERSION="8.0.5-ent"
소스 코드
포함된 모든 소스 코드 MongoDB Kubernetes Operator 리포지토리 에서 찾을 수 있습니다.
절차
TLS 인증서를 생성합니다.
kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" apply -f - <<EOF apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: om-cert spec: dnsNames: - om-svc.${OM_NAMESPACE}.svc.cluster.local duration: 240h0m0s issuerRef: name: my-ca-issuer kind: ClusterIssuer renewBefore: 120h0m0s secretName: cert-prefix-om-cert usages: - server auth - client auth --- apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: om-db-cert spec: dnsNames: - "*.${OM_NAMESPACE}.svc.cluster.local" duration: 240h0m0s issuerRef: name: my-ca-issuer kind: ClusterIssuer renewBefore: 120h0m0s secretName: cert-prefix-om-db-cert usages: - server auth - client auth EOF
Ops Manager를 설치합니다.
이제 MongoDB Ops Manager 리소스를 배포하기 위한 환경과 Kubernetes Operator가 준비되었습니다.
MongoDB Ops Manager 애플리케이션 인스턴스를 배포한 후 Kubernetes Operator가 생성할 MongoDB Ops Manager 관리자에 필요한 자격 증명을 생성합니다.
1 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" --namespace "${OM_NAMESPACE}" create secret generic om-admin-user-credentials \ 2 --from-literal=Username="admin" \ 3 --from-literal=Password="Passw0rd@" \ 4 --from-literal=FirstName="Jane" \ 5 --from-literal=LastName="Doe" 연산자 클러스터 라고도 하는 단일 멤버 클러스터 에 가능한 가장 간단한
MongoDBOpsManager사용자 지정 리소스 ( TLS 활성화)를 배포합니다.이 배포서버 단일 클러스터 모드 의 배포서버 와 거의
spec.topology동일하지만spec.applicationDatabase.topology및 가MultiCluster로 설정하다 .이 방법으로 배포하면 단일 Kubernetes 클러스터 배포가 단일 Kubernetes 멤버 클러스터에 대한 다중 Kubernetes 클러스터 배포의 특수한 경우임을 알 수 있습니다. 처음부터 필요한 만큼의 Kubernetes 클러스터에 MongoDB Ops Manager 애플리케이션 및 애플리케이션 데이터베이스 배포를 시작할 수 있으며, 단일 멤버 Kubernetes 클러스터로 배포를 시작할 필요가 없습니다.
이제 둘 이상의 Kubernetes 클러스터에 걸쳐 있도록 MongoDB Ops Manager 배포를 준비했으며, 이 작업은 이 절차의 뒷부분에서 수행합니다.
1 kubectl apply --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" -f - <<EOF 2 apiVersion: mongodb.com/v1 3 kind: MongoDBOpsManager 4 metadata: 5 name: om 6 spec: 7 topology: MultiCluster 8 version: "${OPS_MANAGER_VERSION}" 9 adminCredentials: om-admin-user-credentials 10 externalConnectivity: 11 type: LoadBalancer 12 security: 13 certsSecretPrefix: cert-prefix 14 tls: 15 ca: ca-issuer 16 clusterSpecList: 17 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 18 members: 1 19 applicationDatabase: 20 version: "${APPDB_VERSION}" 21 topology: MultiCluster 22 security: 23 certsSecretPrefix: cert-prefix 24 tls: 25 ca: ca-issuer 26 clusterSpecList: 27 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 28 members: 3 29 backup: 30 enabled: false 31 EOF Kubernetes Operator가 작업을 시작하고
status.applicationDatabase.phase=Pending상태에 도달할 때까지 기다립니다. 애플리케이션 데이터베이스와 MongoDB Ops Manager 배포가 모두 완료될 때까지 기다립니다.1 echo "Waiting for Application Database to reach Pending phase..." 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.applicationDatabase.phase}'=Pending opsmanager/om --timeout=30s MongoDB Ops Manager를 배포합니다. Kubernetes Operator는 다음 단계를 수행하여 MongoDB Ops Manager를 배포합니다. 다음과 같습니다.
애플리케이션 데이터베이스의 복제본 세트 노드를 배포하고 복제본 세트의 MongoDB 프로세스가 실행되기 시작할 때까지 기다립니다.
애플리케이션 데이터베이스의 연결 string 을 사용하여 MongoDB Ops Manager 애플리케이션 인스턴스를 배포하고 준비될 때까지 기다립니다.
각 애플리케이션 데이터베이스의 파드에 모니터링 MongoDB Agent 컨테이너를 추가합니다.
MongoDB Ops Manager 애플리케이션과 애플리케이션 데이터베이스 파드가 모두 실행되기를 기다립니다.
1 echo "Waiting for Application Database to reach Running phase..." 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.applicationDatabase.phase}'=Running opsmanager/om --timeout=1200s 3 echo; echo "Waiting for Ops Manager to reach Running phase..." 4 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.opsManager.phase}'=Running opsmanager/om --timeout=1200s 5 echo; echo "MongoDBOpsManager resource" 6 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get opsmanager/om 7 echo; echo "Pods running in cluster ${K8S_CLUSTER_0_CONTEXT_NAME}" 8 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods 9 echo; echo "Pods running in cluster ${K8S_CLUSTER_1_CONTEXT_NAME}" 10 kubectl --context "${K8S_CLUSTER_1_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods 이제 멀티 클러스터 모드 에서 단일 멤버 클러스터를 배포했으므로 둘 이상의 Kubernetes 클러스터에 걸쳐 배포되도록 이 배포를 재구성할 수 있습니다.
두 번째 멤버 클러스터에서 애플리케이션 데이터베이스 복제본 세트 멤버 2개와 MongoDB Ops Manager 애플리케이션의 추가 인스턴스 1개를 배포합니다.
1 kubectl apply --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" -f - <<EOF 2 apiVersion: mongodb.com/v1 3 kind: MongoDBOpsManager 4 metadata: 5 name: om 6 spec: 7 topology: MultiCluster 8 version: "${OPS_MANAGER_VERSION}" 9 adminCredentials: om-admin-user-credentials 10 externalConnectivity: 11 type: LoadBalancer 12 security: 13 certsSecretPrefix: cert-prefix 14 tls: 15 ca: ca-issuer 16 clusterSpecList: 17 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 18 members: 1 19 - clusterName: "${K8S_CLUSTER_1_CONTEXT_NAME}" 20 members: 1 21 applicationDatabase: 22 version: "${APPDB_VERSION}" 23 topology: MultiCluster 24 security: 25 certsSecretPrefix: cert-prefix 26 tls: 27 ca: ca-issuer 28 clusterSpecList: 29 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 30 members: 3 31 - clusterName: "${K8S_CLUSTER_1_CONTEXT_NAME}" 32 members: 2 33 backup: 34 enabled: false 35 EOF Kubernetes Operator가 작업을 시작할 때까지 기다립니다(보류 단계).
1 echo "Waiting for Application Database to reach Pending phase..." 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.applicationDatabase.phase}'=Pending opsmanager/om --timeout=30s 3 4 echo "Waiting for Ops Manager to reach Pending phase..." 5 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.opsManager.phase}'=Pending opsmanager/om --timeout=600s Kubernetes Operator가 모든 구성 요소 배포를 완료할 때까지 기다립니다.
1 echo "Waiting for Application Database to reach Running phase..." 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.applicationDatabase.phase}'=Running opsmanager/om --timeout=1200s 3 echo; echo "Waiting for Ops Manager to reach Running phase..." 4 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.opsManager.phase}'=Running opsmanager/om --timeout=1200s 5 echo; echo "MongoDBOpsManager resource" 6 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get opsmanager/om 7 echo; echo "Pods running in cluster ${K8S_CLUSTER_0_CONTEXT_NAME}" 8 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods 9 echo; echo "Pods running in cluster ${K8S_CLUSTER_1_CONTEXT_NAME}" 10 kubectl --context "${K8S_CLUSTER_1_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods
백업을 활성화합니다.
Ops Manager 애플리케이션 의 다중 Kubernetes 클러스터 배포서버 에서는 S3기반 백업 저장 만 구성할 수 있습니다. 이 절차는 env_variables.sh에 정의된 S3_*를 참조합니다.
선택 사항. 테스트를 위해 S3호환 저장 배포합니다.
이 단계에서는 테스트 목적으로 간단한 RustFS 인스턴스 배포하는 스크립트 제공합니다. AWS S3 또는 기타 S3호환 버킷을 사용할 수 있는 경우 이 단계를 건너뛸 수 있습니다.이 경우 env_variables.sh에서
S3_*변수를 적절히 조정합니다.참고
RustFS는 테스트용이며 프로덕션에는 적합하지 않습니다. 프로덕션의 경우 자체 S3 저장 사용합니다.
1 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" create namespace "${RUSTFS_NAMESPACE}" --dry-run=client -o yaml | \ 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" apply -f - 3 4 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${RUSTFS_NAMESPACE}" delete job rustfs-create-buckets --ignore-not-found=true || true 5 6 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${RUSTFS_NAMESPACE}" apply -f - <<EOF 7 apiVersion: cert-manager.io/v1 8 kind: Certificate 9 metadata: 10 name: rustfs-cert 11 spec: 12 dnsNames: 13 - rustfs.${RUSTFS_NAMESPACE}.svc.cluster.local 14 duration: 240h0m0s 15 issuerRef: 16 name: my-ca-issuer 17 kind: ClusterIssuer 18 renewBefore: 120h0m0s 19 secretName: rustfs-tls 20 usages: 21 - server auth 22 --- 23 apiVersion: v1 24 kind: Service 25 metadata: 26 name: rustfs 27 labels: 28 app: rustfs 29 spec: 30 selector: 31 app: rustfs 32 ports: 33 - name: s3-https 34 port: 443 35 targetPort: 9000 36 - name: s3 37 port: 9000 38 targetPort: 9000 39 --- 40 apiVersion: apps/v1 41 kind: Deployment 42 metadata: 43 name: rustfs 44 labels: 45 app: rustfs 46 spec: 47 replicas: 1 48 selector: 49 matchLabels: 50 app: rustfs 51 template: 52 metadata: 53 labels: 54 app: rustfs 55 annotations: 56 # RustFS needs no mesh sidecar; keep behavior identical with and 57 # without Istio. 58 sidecar.istio.io/inject: "false" 59 spec: 60 securityContext: 61 runAsNonRoot: true 62 runAsUser: 10001 63 runAsGroup: 10001 64 fsGroup: 10001 65 seccompProfile: 66 type: RuntimeDefault 67 containers: 68 - name: rustfs 69 image: quay.io/rustfs/rustfs:1.0.0 70 securityContext: 71 allowPrivilegeEscalation: false 72 capabilities: 73 drop: ["ALL"] 74 runAsNonRoot: true 75 env: 76 - name: RUSTFS_ACCESS_KEY 77 value: "${S3_ACCESS_KEY}" 78 - name: RUSTFS_SECRET_KEY 79 value: "${S3_SECRET_KEY}" 80 - name: RUSTFS_VOLUMES 81 value: /data 82 - name: RUSTFS_ADDRESS 83 value: 0.0.0.0:9000 84 - name: RUSTFS_CONSOLE_ENABLE 85 value: "false" 86 - name: RUSTFS_TLS_PATH 87 value: /opt/tls 88 ports: 89 - name: s3 90 containerPort: 9000 91 readinessProbe: 92 httpGet: 93 scheme: HTTPS 94 path: /health 95 port: 9000 96 initialDelaySeconds: 5 97 periodSeconds: 3 98 volumeMounts: 99 - name: data 100 mountPath: /data 101 - name: tls 102 mountPath: /opt/tls 103 readOnly: true 104 volumes: 105 - name: data 106 emptyDir: {} 107 - name: tls 108 secret: 109 secretName: rustfs-tls 110 items: 111 - key: tls.crt 112 path: rustfs_cert.pem 113 - key: tls.key 114 path: rustfs_key.pem 115 --- 116 apiVersion: batch/v1 117 kind: Job 118 metadata: 119 name: rustfs-create-buckets 120 spec: 121 backoffLimit: 1 122 template: 123 metadata: 124 annotations: 125 # istio-proxy keeps running after the aws-cli container exits, so an 126 # injected Job never reaches Complete. 127 sidecar.istio.io/inject: "false" 128 spec: 129 restartPolicy: Never 130 containers: 131 - name: aws-cli 132 image: public.ecr.aws/aws-cli/aws-cli:latest 133 env: 134 - name: AWS_ACCESS_KEY_ID 135 value: "${S3_ACCESS_KEY}" 136 - name: AWS_SECRET_ACCESS_KEY 137 value: "${S3_SECRET_KEY}" 138 - name: AWS_DEFAULT_REGION 139 value: us-east-1 140 - name: S3_ENDPOINT 141 value: "https://${S3_ENDPOINT}" 142 - name: S3_OPLOG_BUCKET_NAME 143 value: "${S3_OPLOG_BUCKET_NAME}" 144 - name: S3_SNAPSHOT_BUCKET_NAME 145 value: "${S3_SNAPSHOT_BUCKET_NAME}" 146 command: ["sh", "-ec"] 147 args: 148 - | 149 aws_opts="--endpoint-url \$S3_ENDPOINT --no-verify-ssl --cli-connect-timeout 5 --cli-read-timeout 10" 150 attempt=0 151 until aws \$aws_opts s3api list-buckets; do 152 attempt=\$((attempt + 1)) 153 if [ "\$attempt" -ge 24 ]; then 154 echo "RustFS endpoint \$S3_ENDPOINT not reachable after \$attempt attempts" >&2 155 exit 1 156 fi 157 sleep 5 158 done 159 aws \$aws_opts s3api create-bucket --bucket "\$S3_OPLOG_BUCKET_NAME" 160 aws \$aws_opts s3api create-bucket --bucket "\$S3_SNAPSHOT_BUCKET_NAME" 161 EOF 162 163 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${RUSTFS_NAMESPACE}" wait --for=condition=available deployment/rustfs --timeout=300s 164 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${RUSTFS_NAMESPACE}" wait --for=condition=complete job/rustfs-create-buckets --timeout=240s 백업을 구성하고 활성화하기 전에 시크릿을 생성하세요.
s3-access-secret- S3 자격 증명 포함합니다.s3-ca-cert- 버킷의 서버 인증서를 발급한 CA 인증서가 포함되어 있습니다. 이 절차의 샘플 RustFS 배포서버 인증서 관리자가 발급한 인증서를 제공하므로 시크릿에는rustfs-tls시크릿의 CA 인증서가 포함됩니다. 이 CA 인증서는 공개적으로 신뢰할 수 있는 인증서가 아니므로 Ops Manager 연결을 신뢰할 수 있도록 제공해야 합니다.
공개적으로 신뢰할 수 있는 인증서를 사용하는 경우 이 단계를 건너뛰고
spec.backup.s3Stores.customCertificateSecretRefs및spec.backup.s3OpLogStores.customCertificateSecretRefs설정에서 값을 제거할 수 있습니다.1 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" create secret generic s3-access-secret \ 2 --from-literal=accessKey="${S3_ACCESS_KEY}" \ 3 --from-literal=secretKey="${S3_SECRET_KEY}" 4 5 # RustFS serves a cert-manager certificate; OM must trust the CA that signed it. 6 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" create secret generic s3-ca-cert \ 7 --from-literal=ca.crt="$(kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${RUSTFS_NAMESPACE}" get secret rustfs-tls -o jsonpath="{.data['ca\.crt']}" | base64 --decode)"
백업을 활성화한 상태에서 MongoDB Ops Manager를 다시 배포합니다.
Kubernetes Operator는 Kubernetes Operator를 구성하는 모든 멤버 클러스터에서 모든 구성 요소, MongoDB Ops Manager 애플리케이션, 백업 데몬 인스턴스, 애플리케이션 데이터베이스의 복제본 세트 노드를 원하는 조합으로 구성하고 배포할 수 있습니다.
다중 Kubernetes 클러스터 배포 구성의 유연성을 설명하기 위해 세 번째 멤버 클러스터에 하나의 백업 데몬 인스턴스만 배포하고 첫 번째 및 두 번째 클러스터에 대해 백업 데몬 멤버를 0으로 지정합니다.
1 kubectl apply --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" -f - <<EOF 2 apiVersion: mongodb.com/v1 3 kind: MongoDBOpsManager 4 metadata: 5 name: om 6 spec: 7 topology: MultiCluster 8 version: "${OPS_MANAGER_VERSION}" 9 adminCredentials: om-admin-user-credentials 10 externalConnectivity: 11 type: LoadBalancer 12 security: 13 certsSecretPrefix: cert-prefix 14 tls: 15 ca: ca-issuer 16 clusterSpecList: 17 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 18 members: 1 19 backup: 20 members: 0 21 - clusterName: "${K8S_CLUSTER_1_CONTEXT_NAME}" 22 members: 1 23 backup: 24 members: 0 25 - clusterName: "${K8S_CLUSTER_2_CONTEXT_NAME}" 26 members: 0 27 backup: 28 members: 1 29 applicationDatabase: 30 version: "${APPDB_VERSION}" 31 topology: MultiCluster 32 security: 33 certsSecretPrefix: cert-prefix 34 tls: 35 ca: ca-issuer 36 clusterSpecList: 37 - clusterName: "${K8S_CLUSTER_0_CONTEXT_NAME}" 38 members: 3 39 - clusterName: "${K8S_CLUSTER_1_CONTEXT_NAME}" 40 members: 2 41 backup: 42 enabled: true 43 s3Stores: 44 - name: my-s3-block-store 45 s3SecretRef: 46 name: "s3-access-secret" 47 pathStyleAccessEnabled: true 48 s3BucketEndpoint: "${S3_ENDPOINT}" 49 s3BucketName: "${S3_SNAPSHOT_BUCKET_NAME}" 50 customCertificateSecretRefs: 51 - name: s3-ca-cert 52 key: ca.crt 53 s3OpLogStores: 54 - name: my-s3-oplog-store 55 s3SecretRef: 56 name: "s3-access-secret" 57 s3BucketEndpoint: "${S3_ENDPOINT}" 58 s3BucketName: "${S3_OPLOG_BUCKET_NAME}" 59 pathStyleAccessEnabled: true 60 customCertificateSecretRefs: 61 - name: s3-ca-cert 62 key: ca.crt 63 EOF Kubernetes Operator 구성이 완료될 때까지 기다립니다.
1 echo; echo "Waiting for Backup to reach Running phase..." 2 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.backup.phase}'=Running opsmanager/om --timeout=1200s 3 echo "Waiting for Application Database to reach Running phase..." 4 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.applicationDatabase.phase}'=Running opsmanager/om --timeout=1200s 5 echo; echo "Waiting for Ops Manager to reach Running phase..." 6 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" wait --for=jsonpath='{.status.opsManager.phase}'=Running opsmanager/om --timeout=1200s 7 echo; echo "MongoDBOpsManager resource" 8 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get opsmanager/om 9 echo; echo "Pods running in cluster ${K8S_CLUSTER_0_CONTEXT_NAME}" 10 kubectl --context "${K8S_CLUSTER_0_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods 11 echo; echo "Pods running in cluster ${K8S_CLUSTER_1_CONTEXT_NAME}" 12 kubectl --context "${K8S_CLUSTER_1_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods 13 echo; echo "Pods running in cluster ${K8S_CLUSTER_2_CONTEXT_NAME}" 14 kubectl --context "${K8S_CLUSTER_2_CONTEXT_NAME}" -n "${OM_NAMESPACE}" get pods
Kubernetes 연산자에 대한 자격 증명을 생성합니다.
자격 증명 구성하려면 MongoDB Ops Manager 조직 생성하고, MongoDB Ops Manager UI 에서 프로그래밍 방식의 API 키를 생성하고, 로드 밸런서 IP 로 시크릿 을 생성해야 합니다. 자세한 학습 은 Kubernetes Operator에 대한 자격 증명 생성 을 참조하세요.