Docs Menu
Docs Home
/
MongoDB Enterprise Kubernetes ์—ฐ์‚ฐ์ž
/ /

ConfigMap์„ ์‚ฌ์šฉํ•˜์—ฌ 1๊ฐœ์˜ ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ธฐ

์ด ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ

  • ๊ณ ๋ ค ์‚ฌํ•ญ
  • ์ „์ œ ์กฐ๊ฑด
  • ConfigMap์„ ์‚ฌ์šฉํ•˜์—ฌ 1๊ฐœ์˜ ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ธฐ
  • ์‚ฌ์šฉ์ž ์ง€์ • CA๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ HTTPS ์ง€์› Ops Manager์— ์—ฐ๊ฒฐ
  • ๋‹ค์Œ ๋‹จ๊ณ„

MongoDB Enterprise Kubernetes Operator Kubernetes MongoDB MongoDB Ops Manager ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ Kubernetes Operator๋Š” Kubernetes ConfigMap ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ณ ์œ ํ•œ ๋‹จ์ผ MongoDB Ops Manager ํ”„๋กœ์ ํŠธ์— ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค. ์ฐธ์กฐ๋œ ํ”„๋กœ์ ํŠธ ๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ, Kubernetes Operator๋Š” ConfigMap์— ์ œ๊ณตํ•œ projectName ์— ๋”ฐ๋ผ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

Kubernetes ์—ฐ์‚ฐ์ž ConfigMap์„ ๋งŒ๋“ค๋ ค๋ฉด ์˜ˆ์ œ ConfigMap YAML ํŒŒ์ผ์˜ ๋ช‡ ์ค„์„ ํŽธ์ง‘ํ•˜๊ณ  ConfigMap์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ „์ฒด ์˜ˆ์‹œ๋ฅผ ๋ณด๋ ค๋ฉด project.yaml ํŒŒ์ผ์ž…๋‹ˆ๋‹ค.

๋˜๋Š” MongoDB Cloud Manager UI ๋˜๋Š” MongoDB Ops Manager UI ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋กœ์ ํŠธ ๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์„ ํƒํ•˜๊ณ  ConfigMap YAML ํŒŒ์ผ ์„ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•œ ๋‹ค์Œ Kubernetes ํ™˜๊ฒฝ์— ์ ์šฉ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  1. ํ”„๋กœ์ ํŠธ ๋‹น ํ•˜๋‚˜์˜ MongoDB ๋ฆฌ์†Œ์Šค ๋งŒ ๋ฐฐํฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ œํ•œ์ด ์ ์šฉ๋˜๋Š” ์ด์œ ๋Š” MongoDB Ops Manager ๊ฐ€ ํ”„๋กœ์ ํŠธ ๋‹น ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์‚ฌ์šฉ์ž ์•ก์„ธ์Šค ์— ๋Œ€ํ•ด ํ•˜๋‚˜์˜ ์ธ์ฆ ๋ฐฉ๋ฒ•๋งŒ ์ง€์›ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ํ•™์Šต ๋‚ด์šฉ์€ MongoDB ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋ฆฌ์†Œ์Šค ๋ฐฐํฌ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

  2. MongoDB Enterprise Kubernetes Operator ๋ฐฐํฌ๋ฅผ ๊ณ ์œ ํ•œ MongoDB Ops Manager ํ”„๋กœ์ ํŠธ ์— ํŽ˜์–ด๋งํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฐฐํฌํ•˜๋Š” ๊ฐ MongoDB Enterprise Kubernetes Operator ์ธ์Šคํ„ด์Šค์— ๋Œ€ํ•ด ๊ณ ์œ ํ•œ ConfigMap์„ ๋งŒ๋“ค๊ฑฐ๋‚˜ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์ด ๋ฐฐํฌ๋œ ๋ฆฌ์†Œ์Šค ์ด๋ฆ„๊ณผ ์ •๋ ฌ๋˜๋„๋ก ConfigMap์—์„œ data.projectName ๋ฅผ ์ƒ๋žตํ•˜์—ฌ ๋™์ผํ•œ ConfigMap์„ ์—ฌ๋Ÿฌ ๋ฐฐํฌ์— ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. config ๋งต์— ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์ด ์ œ๊ณต๋˜๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„์ง ์กด์žฌํ•˜์ง€ ์•Š์œผ๋ฉด ํ”„๋กœ์ ํŠธ๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

์ค‘์š”

  • Kubernetes Operator๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Cloud Manager ๋ฐ Ops Manager ๋ฒ„์ „ 6.0.x ์ด์ƒ๊ณผ ํ•จ๊ป˜ MongoDB ๋ฆฌ์†Œ์Šค๋ฅผ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • Atlas Operator ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Atlas์— 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 ๋„ค์ž„์ŠคํŽ˜์ด์Šค ์—ฌ๊ธฐ์„œ Kubernetes Operator๋Š” ์ด MongoDB ๋ฆฌ์†Œ์Šค ๋ฐ ๊ธฐํƒ€ ๊ฐ์ฒด ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. .
mongodb
data.projectName
๋ฌธ์ž์—ด

Ops Manager ํ”„๋กœ์ ํŠธ์˜๋ ˆ์ด๋ธ”์ž…๋‹ˆ๋‹ค.

Kubernetes Operator๋Š” MongoDB Ops Manager ํ”„๋กœ์ ํŠธ๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ ์ด๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. projectName ์„ ์ƒ๋žตํ•˜๋ฉด Kubernetes Operator๊ฐ€ Kubernetes ๋ฆฌ์†Œ์Šค์™€ ๋™์ผํ•œ ์ด๋ฆ„์œผ๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

Cloud Manager ๋˜๋Š” Ops Manager ์กฐ์ง์˜ ๊ธฐ์กด ํ”„๋กœ์ ํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด Cloud Manager ๋˜๋Š” Ops Manager ํŽ˜์ด์ง€์˜ ์™ผ์ชฝ ์ƒ๋‹จ์— ์žˆ๋Š” All Clusters ๋งํฌ๋ฅผ ํด๋ฆญํ•˜๊ณ  ์—์„œ ์ด๋ฆ„์œผ๋กœ ๊ฒ€์ƒ‰ํ•˜์—ฌ projectName ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค. Search ์ƒ์ž๋ฅผ ํด๋ฆญํ•˜๊ฑฐ๋‚˜ ์Šคํฌ๋กคํ•˜์—ฌ ๋ชฉ๋ก์—์„œ ์ด๋ฆ„์„ ์ฐพ์Šต๋‹ˆ๋‹ค. ์ด ๋ชฉ๋ก์˜ ๊ฐ ์นด๋“œ๋Š” ํ•˜๋‚˜์˜ Cloud Manager ๋˜๋Š” Ops Manager ์กฐ์ง ๋ฐ ํ”„๋กœ์ ํŠธ ์˜ ์กฐํ•ฉ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.

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์— ๋ถ™์—ฌ๋„ฃ์Šต๋‹ˆ๋‹ค.

    ์กฐ์ง์„ ์„ ํƒํ•˜๊ณ  ๋ธŒ๋ผ์šฐ์ €์—์„œ ํ˜„์žฌ URL์„ ํ™•์ธํ•œ ํ›„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด <orgId> ์ž๋ฆฌ ํ‘œ์‹œ์ž์— ํ‘œ์‹œ๋œ ๊ฐ’์„ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

    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 ์—ฐ์‚ฐ์ž์— ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž ์ง€์ • CA๋ฅผ ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด ๋‹ค์Œ์„ ์™„๋ฃŒํ•˜์„ธ์š”.

1

Operator์—๋Š” MongoDB Ops Manager Kubernetes ํ˜ธ์ŠคํŠธ์˜ ์ธ์ฆ์„œ๋ฅผ ๋ฐœ๊ธ‰ํ•œ CA ์˜ ๋ฃจํŠธ CA ์ธ์ฆ์„œ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ConfigMap ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค Pods์˜ ๋™์ผํ•œ ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ๋ฃจํŠธ CA ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

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
๋ถ€์šธ

์—ฐ์‚ฐ์ž๊ฐ€ MongoDB Ops Manager ์—์„œ ์œ ํšจํ•œ TLS ์ธ์ฆ์„œ๋ฅผ์š”๊ตฌํ•˜๋„๋ก ๊ฐ•์ œํ•ฉ๋‹ˆ๋‹ค.

์ค‘์š”: ๊ฐ’์„ ์ž‘์€๋”ฐ์˜ดํ‘œ๋กœ ๋ฌถ์–ด์•ผ ํ•˜๋ฉฐ ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์—ฐ์‚ฐ์ž ์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

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

์ค‘์š”

ํ•ญ์ƒ kubectl ๊ณผ ํ•จ๊ป˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค ์˜ต์…˜์„ ํฌํ•จํ•˜์„ธ์š”. kubectl ์˜ต์…˜์„ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ๊ธฐ๋ณธ์ ์œผ๋กœ ๋นˆ -n ๋„ค์ž„์ŠคํŽ˜์ด์Šค๊ฐ€ ๋˜์–ด ๋ฐฐํฌ์— ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค. <metadata.namespace> ํ•„๋“œ์˜ ๊ฐ’์„ ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. Kubernetes ์—ฐ์‚ฐ์ž, ์‹œํฌ๋ฆฟ MongoDB ๋ฆฌ์†Œ์Šค๋Š” ๋™์ผํ•œ ๊ณ ์œ  ๋„ค์ž„์ŠคํŽ˜์ด์Šค์—์„œ ์‹คํ–‰๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ด ๋ช…๋ น์€ shell์—์„œ ConfigMap ์„ค๋ช…์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

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

ConfigMap์„ ์ƒ์„ฑํ–ˆ์œผ๋ฏ€๋กœ ์ด์ œ MongoDB ๋ฆฌ์†Œ์Šค ๋ฐฐํฌ ๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— Kubernetes ์—ฐ์‚ฐ์ž์— ๋Œ€ํ•œ์ž๊ฒฉ ์ฆ๋ช…์„ ์ƒ์„ฑ ํ•ฉ๋‹ˆ๋‹ค.

๋Œ์•„๊ฐ€๊ธฐ

์ž๊ฒฉ ์ฆ๋ช… ๋งŒ๋“ค๊ธฐ