AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

ConfigMap을 사용하여 MongoDB 배포당 1개의 프로젝트 생성

The MongoDB Controllers for Kubernetes Operator uses a Kubernetes ConfigMap to link to a single and unique Ops Manager Project. If the referenced project doesn't exist, the Kubernetes Operator creates it according to the projectName that you provide in the ConfigMap.

Kubernetes 연산자 ConfigMap을 만들려면 예시 ConfigMap YAML 파일의 몇 줄을 편집하고 ConfigMap을 적용 됩니다. 전체 예시를 보려면 프로젝트.yaml 파일 참조하세요.

또는 MongoDB Cloud Manager UI 또는 MongoDB Ops Manager UI 를 사용하여 프로젝트 를 만들거나 선택하고 ConfigMap YAML 파일 을 자동으로 생성한 다음 Kubernetes 환경에 적용 할 수 있습니다.

  1. 프로젝트당 MongoDB 리소스를 하나만 배포할 수 있습니다. Ops Manager는 데이터베이스 사용자 액세스에 대해 프로젝트당 하나의 인증 방법만 지원하기 때문에 이 제한이 적용됩니다. 자세한 내용은 MongoDB database 리소스 배포를 참조하세요.

  2. You must pair a MongoDB Controllers for Kubernetes Operator deployment to a unique Ops Manager Project. You can either create a distinct ConfigMap for each MongoDB Controllers for Kubernetes Operator instance you deploy, or you can reuse the same ConfigMap for any number of deployments by omitting the data.projectName from your ConfigMap, so that project names align with deployed resource names. Where a project name is provided in the config map, if that project does not exist yet it will be created.

중요

  • Kubernetes Operator를 사용하여 Cloud Manager 및 Ops Manager 버전 6.0.x 이상과 함께 MongoDB 리소스를 배포할 수 있습니다.

  • Atlas Operator 를 사용하여 Atlas에 MongoDB 리소스를 배포할 수 있습니다.

  • Kubernetes 버전 1.11 이상 또는 Openshift 버전 3.11 이상.

  • Kubernetes Operator용 MongoDB 컨트롤러

    설치되었습니다.

1

아직 실행하지 않았다면 다음 명령을 실행하여 생성한 네임스페이스에서 kubectl 명령을 모두 실행합니다.

참고

다중 Kubernetes 클러스터 MongoDB deployment에서 MongoDB Ops Manager 리소스를 배포하는 경우:

  • context 를 연산자 클러스터 의 이름으로 설정합니다(예: kubectl config set context "$MDB_CENTRAL_CLUSTER_FULL_NAME").

  • --namespace 를 다중 Kubernetes 클러스터 MongoDB 배포에 사용한 것과 동일한 범위 (예: kubectl config --namespace "mongodb" 로 설정합니다.

kubectl config set-context $(kubectl config current-context) --namespace=<metadata.namespace>
2
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: my-project
namespace: mongodb
data:
projectName: myProjectName # this is an optional parameter; when omitted, the Operator creates a project with the resource name
orgId: 5b890e0feacf0b76ff3e7183 # this is a required parameter
baseUrl: https://ops.example.com:8443
EOF
유형
설명
예시

metadata.name

문자열

Kubernetes 객체의 이름입니다.

리소스 이름은 44자 이내여야 합니다.

이 이름은 RFC1123 명명 규칙을 따라야 하며, 소문자 영숫자 문자 또는 만 포함하고 - 시작과 끝이 영숫자로 끝나야 합니다.

자세한 학습 은 이름에 대한 Kubernetes 문서를 참조하세요.

my-project

metadata.namespace

문자열

Kubernetes namespace where the Kubernetes Operator creates this MongoDB resource and other objects.

mongodb

data.projectName

문자열

Ops Manager 프로젝트의레이블입니다.

The Kubernetes Operator creates the Ops Manager project if it does not exist. If you omit the projectName, the Kubernetes Operator creates a project with the same name as your Kubernetes resource.

Cloud Manager 또는 Ops Manager 조직에서 기존 프로젝트를 사용하려면, Cloud Manager 또는 Ops Manager 페이지의 왼쪽 상단에 있는 All Clusters 링크를 클릭한 뒤 스크롤하여 목록에서 projectName 을 찾습니다. 또는 Search 상자에서 이름을 검색합니다. 이 목록의 각 카드는 하나의 Cloud Manager 또는 Ops Manager 조직(Organization)과 프로젝트(Project)의 조합을 나타냅니다.

myProjectName

data.orgId

문자열

필수. 또는 MongoDB Ops Manager 조직을 고유하게 식별하는24 문자 16진수 입니다.string Cloud Manager

Kubernetes Operator를 사용하여 Cloud Manager 및 Ops Manager 버전 6.0.x 이상과 함께 MongoDB 리소스를 배포할 수 있습니다.

Atlas Operator 를 사용하여 Atlas에 MongoDB 리소스를 배포할 수 있습니다.

기존 조직을 지정합니다:

  1. 조직의 ID를 찾습니다.

    왼쪽 탐색 창에서 Settings 을 클릭합니다.

  2. orgId를 복사하여 URL에 붙여넣습니다.

    Select your organization, view the current URL in your browser and copy the value displayed in the <orgId> placeholder as follows:

    https://ops.example.com:8443/ v2#/org/<orgId>/projects

기존 Cloud Manager 또는 Ops Manager 조직 내에서 새 프로젝트를 생성하려면 Organization Project Creator 역할이 있어야 합니다.

orgId 형식으로 빈 문자열을 제공하면 Kubernetes Operator가 프로젝트와 동일한 이름으로 조직을 생성합니다.

5b890e0feacf0b76ff3e7183

data.baseUrl

문자열

FQDN 및 포트 번호를 포함한 Ops Manager 애플리케이션의 URL을 입력합니다.

중요: MongoDB Ops Manager Kubernetes Operator를 사용하여 를 배포 하고 가 배포된 MongoDB Ops Manager MongoDB 클러스터 외부 에 배포된 데이터베이스 리소스를 관리 하는 경우, Kubernetes data.baseUrl 을(를) 설정과 동일한 값으로 spec.configuration.mms.centralUrl MongoDB Ops Manager 설정하다 해야 합니다. 리소스 사양. 학습 내용은 외부 MongoDB 배포 관리를 참조하세요.

클라우드 관리자를 사용하는 경우 data.baseUrl 값을 https://cloud.mongodb.com로 설정합니다.

https://ops.example.com:8443

3
kubectl describe configmaps <configmap-name>

이 명령은 shell에서 ConfigMap 설명을 반환합니다.

Name: <configmap-name>
Namespace: <namespace>
Labels: <none>
Annotations: <none>
Data
====
baseUrl:
----
<myOpsManagerURL>
Events: <none>

자체 TLS 인증서를 사용하여 Ops Manager 인스턴스에 대해 HTTPS 를 활성화하도록 선택할 수도 있습니다. 사용자 지정 인증서를 사용한 경우, 해당 사용자 지정 인증서에 서명한 CA를 Kubernetes 연산자에 추가해야 합니다. To add your custom CA, complete the following:

1

The Kubernetes Operator requires the root CA certificate of the CA that issued the Ops Manager host's certificate. Run the following command to create a ConfigMap containing the root CA in the same namespace of your database Pods:

kubectl -n <metadata.namespace> create configmap <root-ca-configmap-name> \
--from-file=mms-ca.crt

중요

Kubernetes 연산자는 ConfigMap에서 Ops Manager 리소스의 인증서 이름을 mms-ca.crt 으로 지정해야 합니다.

2
1---
2apiVersion: v1
3kind: ConfigMap
4metadata:
5 name: <my-configmap>
6 namespace: <my-namespace>
7data:
8 projectName: <my-ops-manager-project-name> # this is an optional parameter
9 orgId: <org-id> # this is a required parameter
10 baseUrl: https://<my-ops-manager-URL>
11 sslMMSCAConfigMap: <root-ca-configmap-name>
12 sslRequireValidMMSServerCertificates: ‘true’
13...
3
  1. 기본 구성된 편집기에서 프로젝트의 ConfigMap을 편집하려면 다음 명령을 호출합니다.

    kubectl edit configmaps <my-configmap> -n <metadata.namespace>
  2. 예제 ConfigMap 에 강조 표시된 섹션을 붙여넣습니다. 프로젝트 ConfigMap의 끝에서.

4

다음 TLS 키를 변경합니다.

유형
설명
예시

sslMMSCAConfigMap

문자열

ConfigMap 의 이름 첫 번째 단계에서 생성된 MongoDB Ops Manager 호스트의 인증서에 서명하는 데 사용되는 루트 CA 인증서를 포함합니다. 그러면 CA 인증서가 Kubernetes Operator 및 데이터베이스 리소스에 마운트됩니다.

my-root-ca

sslRequireValidMMSServerCertificates

부울

Forces the Operator to require a valid TLS certificate from Ops Manager.

중요: 값을 작은따옴표로 묶어야 하며 그렇지 않으면 연산자 에서 오류가 발생합니다.

'true'

5
6
kubectl describe configmaps <my-configmap> -n <metadata.namespace>

중요

Always include the namespace option with kubectl. kubectl defaults to an empty namespace if you don't specify the -n option, resulting in deployment failures. You must specify the value of the <metadata.namespace> field. The Kubernetes Operator, secret, and MongoDB resources should run in the same unique namespace.

이 명령은 shell에서 ConfigMap 설명을 반환합니다.

Name: <my-configmap>
Namespace: <namespace>
Labels: <none>
Annotations: <none>
Data
====
sslMMSCAConfigMap:
----
<root-ca-configmap-name>
sslRequireValidMMSServerCertificates:
----
true
Events: <none>

ConfigMap을 생성했으므로 이제 MongoDB 리소스 배포 를 시작하기 전에 Kubernetes 연산자에 대한자격 증명을 생성 합니다.