1
1
---
2
2
stepnum : 1
3
3
level : 4
4
- ref : clone-k8s-repo-kind
5
- title : " Clone the :github:`MongoDB Enterprise Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes>`."
6
- content : |
7
-
8
- .. code-block:: sh
9
-
10
- git clone https://github.com/mongodb/mongodb-enterprise-kubernetes.git
4
+ source :
5
+ file : steps-helm-master.yaml
6
+ ref : install-helm-charts
11
7
12
8
---
13
9
stepnum : 2
14
10
level : 4
15
- ref : create- k8s-ns-kind
16
- title : " Create a |k8s-ns| for your |k8s| deployment. "
11
+ title : " Install the | k8s-op-full| "
12
+ ref : install-kubectl-quickstart
17
13
content : |
18
14
19
- By default, The |k8s-op-short| uses the ``mongodb`` namespace. To
20
- simplify your installation, consider creating a namespace labeled
21
- ``mongodb`` using the following |kubectl| command:
15
+ To :github:`install the Kubernetes Operator with the Helm Chart
16
+ </mongodb/helm-charts/tree/main/charts/enterprise-operator#installing-enterprise-operator>`, see the
17
+ instructions in the repository.
18
+
19
+ **Example**
20
+
21
+ The following command installs the |k8s-op-full| in the ``mongodb``
22
+ namespace with the optional ``--create-namespace`` option. By
23
+ default, |k8s-op-short| uses the ``default`` namespace.
22
24
23
25
.. code-block:: sh
24
26
25
- kubectl create namespace mongodb
27
+ helm install enterprise-operator mongodb/enterprise-operator -- namespace mongodb --create-namespace
26
28
27
29
---
28
30
stepnum : 3
29
31
level : 4
30
- ref : configure-kubectl-configmap-kind
32
+ ref : configure-kubectl-quickstart
31
33
title : " Configure ``kubectl`` to default to your namespace."
32
34
content : |
33
35
34
- If you have not already, run the following command to execute all
36
+ If you haven't already, run the following command to execute all
35
37
``kubectl`` commands in the namespace you created:
36
38
37
39
.. code-block:: sh
@@ -40,117 +42,143 @@ content: |
40
42
41
43
---
42
44
stepnum : 4
43
- level : 4
44
- title : " Install the |k8s-op-full|"
45
- ref : install-kubectl-kind
45
+ title : " Configure the Kubernetes Operator"
46
+ ref : configure-kubernetes-operator-quickstart
46
47
content : |
47
48
48
- a. Change to the directory in which you cloned the repository.
49
+ a. :cloudmgr:`Go to the Kubernetes Setup Page in the Cloud Manager UI
50
+ <tutorial/nav/k8s-config-for-mdb-resource/#navigate-to-the-kubernetes-setup-page-in-the-mms-ui>`.
49
51
50
- #. Install the |k8s-crds| for MongoDB deployments using the
51
- following |kubectl| command:
52
+ #. Click :guilabel:`Create New API Keys` or
53
+ :guilabel:`Use Existing API Keys`.
52
54
53
- .. code-block:: sh
55
+ #. Complete the form. To learn more, see
56
+ :cloudmgr:`Programmatic Access to Cloud Manager
57
+ </tutorial/manage-programmatic-api-keys/>`.
54
58
55
- kubectl apply -f crds.yaml
56
-
57
- #. Install the |k8s-op-short| using the following |kubectl| command:
59
+ #. Click :guilabel:`Generate Key and YAML`.
58
60
59
- .. code-block:: sh
60
-
61
- kubectl apply -f mongodb-enterprise.yaml
62
-
63
61
---
64
62
stepnum : 5
65
- title : " Create credentials and store them as a secret."
66
- ref : create-k8s-credentials-kind
63
+ level : 4
64
+ title : " Copy and save the ConfigMap."
65
+ ref : copy-k8s-configmap-quickstart
67
66
content : |
68
67
69
- Run the following command:
68
+ Copy and save the generated ``config-map.yaml`` file.
70
69
71
- .. note::
70
+ **Example:**
72
71
73
- Provide your Public and Private Key values for the following
74
- parameters. To learn more, see :ref:`create-k8s-credentials`.
72
+ .. code-block:: yaml
75
73
76
- .. code-block:: sh
74
+ apiVersion: v1
75
+ kind: ConfigMap
76
+ metadata:
77
+ name: my-project
78
+ namespace: mongodb
79
+ data:
80
+ baseUrl: https://cloud.mongodb.com
77
81
78
- kubectl -n mongodb \
79
- create secret generic ops-manager-admin-key \
80
- --from-literal="publicKey=<publicKey>" \
81
- --from-literal="privateKey=<privateKey>"
82
+ # Optional Parameters
83
+ # projectName: My Ops/Cloud Manager Project
84
+
85
+ ordId: 5ecd252f8c1a75033c74106c
82
86
87
+ To learn more, see the :doc:`parameter descriptions
88
+ </tutorial/create-project-using-configmap>`.
89
+
83
90
---
84
91
stepnum : 6
85
92
level : 4
86
- title : " Invoke the following command to create a ConfigMap ."
87
- ref : copy-k8s-configmap-kind
93
+ title : " Copy and save the Secret ."
94
+ ref : copy-k8s-secret-quickstart
88
95
content : |
89
96
90
- .. note::
97
+ Copy and save the generated ``secret.yaml`` file.
91
98
92
- Provide your values for the following parameters. To learn more,
93
- see the :doc:`parameter descriptions
94
- </tutorial/create-project-using-configmap>`.
99
+ **Example:**
95
100
96
- .. code-block:: sh
101
+ .. code-block:: yaml
97
102
98
- kubectl create configmap myconfigmap \
99
- --from-literal="baseUrl=<myOpsManagerURL>" \
100
- --from-literal="projectName=<myOpsManagerProjectName>" \ #Optional
101
- --from-literal="orgId=<orgID>" #Required for Global API Keys
103
+ apiVersion: v1
104
+ kind: Secret
105
+ metadata:
106
+ name: organization-secret
107
+ namespace: mongodb
108
+ stringData:
109
+ user: <public_key>
110
+ publicAPIKey: <private_key>
111
+
112
+ For security purposes, |cloud| displays this file only once.
102
113
103
114
---
104
115
stepnum : 7
105
116
level : 4
106
- title : " Deploy the :term:`replica set` resource ."
107
- ref : deploy-replica-set-kind
117
+ title : " Apply the ConfigMap and Secret ."
118
+ ref : apply-configmap-secret
108
119
content : |
109
120
110
121
Run the following command:
111
122
112
123
.. code-block:: sh
113
124
114
- cat <<EOF | kubectl apply -f -
115
- apiVersion: mongodb.com/v1
116
- kind: MongoDB
117
- metadata:
118
- name: demo-mongodb-cluster-1
119
- namespace: mongodb
120
- spec:
121
- members: 3
122
- version: 4.4.5-ent
123
- type: ReplicaSet
124
- authentication:
125
- enabled: true
126
- modes: ["SHA"]
127
- opsManager:
128
- configMapRef:
129
- name: myconfigmap
130
- credentials: ops-manager-admin-key
131
- persistent: true
132
- podSpec:
133
- podTemplate:
134
- spec:
135
- containers:
136
- - name: mongodb-enterprise-database
137
- resources:
138
- limits:
139
- cpu: 2
140
- memory: 1.5G
141
- requests:
142
- cpu: 1
143
- memory: 1G
144
- persistence:
145
- single:
146
- storage: 10Gi
147
- EOF
125
+ kubectl apply -f secret.yaml -f config-map.yaml
148
126
149
127
---
150
128
stepnum : 8
151
129
level : 4
130
+ title : " Deploy the :term:`replica set` resource."
131
+ ref : deploy-replica-set-quickstart
132
+ content : |
133
+
134
+ a. Copy and save the following |yaml| file:
135
+
136
+ .. code-block:: yaml
137
+
138
+ apiVersion: mongodb.com/v1
139
+ kind: MongoDB
140
+ metadata:
141
+ name: demo-mongodb-cluster-1
142
+ namespace: mongodb
143
+ spec:
144
+ members: 3
145
+ version: 4.4.5-ent
146
+ type: ReplicaSet
147
+ authentication:
148
+ enabled: true
149
+ modes: ["SHA"]
150
+ cloudManager:
151
+ configMapRef:
152
+ name: myproject
153
+ credentials: organization-secret
154
+ persistent: true
155
+ podSpec:
156
+ podTemplate:
157
+ spec:
158
+ containers:
159
+ - name: mongodb-enterprise-database
160
+ resources:
161
+ limits:
162
+ cpu: 2
163
+ memory: 1.5G
164
+ requests:
165
+ cpu: 1
166
+ memory: 1G
167
+ persistence:
168
+ single:
169
+ storage: 10Gi
170
+
171
+ #. Run the following command:
172
+
173
+ .. code-block:: sh
174
+
175
+ kubectl apply -f <replica-set-conf>.yaml
176
+
177
+ ---
178
+ stepnum : 9
179
+ level : 4
152
180
title : " Create a secret with your database user password"
153
- ref : create-k8s-user-secret-kind
181
+ ref : create-k8s-user-secret-quickstart
154
182
content : |
155
183
156
184
You can choose to use a cleartext password or a Base64-encoded
@@ -163,9 +191,9 @@ content: |
163
191
see the :doc:`parameter descriptions
164
192
</tutorial/manage-database-users-scram>`.
165
193
166
- For a cleartext password, create and save the following YAML file:
194
+ For a cleartext password, create and save the following |yaml| file:
167
195
168
- .. code-block:: sh
196
+ .. code-block:: yaml
169
197
170
198
apiVersion: v1
171
199
kind: Secret
@@ -180,7 +208,7 @@ content: |
180
208
For a Base64-encoded password, create and save the following YAML
181
209
file:
182
210
183
- .. code-block:: sh
211
+ .. code-block:: yaml
184
212
185
213
apiVersion: v1
186
214
kind: Secret
@@ -193,60 +221,63 @@ content: |
193
221
# corresponds to user.spec.passwordSecretKeyRef.key
194
222
195
223
---
196
- stepnum : 9
224
+ stepnum : 10
197
225
level : 4
198
226
title : " Create a database user."
199
- ref : add-k8s-user-configmap-kind
227
+ ref : add-k8s-user-configmap-quickstart
200
228
content : |
201
229
202
- Run the following command:
230
+ a. Copy and save the following |yaml| file:
231
+
232
+ .. code-block:: yaml
233
+
234
+ apiVersion: mongodb.com/v1
235
+ kind: MongoDBUser
236
+ metadata:
237
+ name: mms-scram-user-1
238
+ spec:
239
+ passwordSecretKeyRef:
240
+ name: mms-user-1-password
241
+ # Match to metadata.name of the User Secret
242
+ key: password
243
+ username: "mms-scram-user-1"
244
+ db: "admin" #
245
+ mongodbResourceRef:
246
+ name: "demo-mongodb-cluster-1"
247
+ # Match to MongoDB resource using authenticaiton
248
+ roles:
249
+ - db: "admin"
250
+ name: "clusterAdmin"
251
+ - db: "admin"
252
+ name: "userAdminAnyDatabase"
253
+ - db: "admin"
254
+ name: "readWrite"
255
+ - db: "admin"
256
+ name: "userAdminAnyDatabase"
257
+
258
+ #. Run the following command:
203
259
204
- .. code-block:: sh
260
+ .. code-block:: sh
205
261
206
- cat <<EOF | kubectl apply -f -
207
- apiVersion: mongodb.com/v1
208
- kind: MongoDBUser
209
- metadata:
210
- name: mms-scram-user-1
211
- spec:
212
- passwordSecretKeyRef:
213
- name: mms-user-1-password
214
- # Match to metadata.name of the User Secret
215
- key: password
216
- username: "mms-scram-user-1"
217
- db: "admin" #
218
- mongodbResourceRef:
219
- name: "demo-mongodb-cluster-1"
220
- # Match to MongoDB resource using authenticaiton
221
- roles:
222
- - db: "admin"
223
- name: "clusterAdmin"
224
- - db: "admin"
225
- name: "userAdminAnyDatabase"
226
- - db: "admin"
227
- name: "readWrite"
228
- - db: "admin"
229
- name: "userAdminAnyDatabase"
230
- EOF
262
+ kubectl apply -f <database-user-conf>.yaml
231
263
232
264
---
233
- stepnum : 10
265
+ stepnum : 11
234
266
level : 4
235
- ref : view-k8s-user-kind
267
+ ref : view-k8s-user-quickstart
236
268
optional : true
237
269
source :
238
270
file : steps-add-database-user-scram.yaml
239
271
ref : view-k8s-user
240
272
241
273
---
242
- stepnum : 11
274
+ stepnum : 12
243
275
level : 4
244
276
title : " Connect to the :term:`replica set`."
245
- ref : connect-k8s-rs-kind
277
+ ref : connect-k8s-rs-quickstart
246
278
content : |
247
279
248
- Perform the following steps in the |cloud-link| or |onprem-link|
249
- application, depending on where your clusters are hosted:
280
+ Perform the following steps in the |cloud-link| application:
250
281
251
282
a. Click :guilabel:`Deployment` in the left navigation.
252
283
0 commit comments