@@ -77,14 +77,16 @@ Static Containers (Public Preview)
77
77
78
78
.. include:: /includes/static-containers-description.rst
79
79
80
- Starting with |k8s-op-full| 1.25, you can use the Public Preview of static containers instead of
81
- the existing non-static containers that download the MongoDB binary from |com|
82
- or the Internet at runtime. You can use the following procedures to enable or disable
83
- static containers for all or individual MongoDB deployments.
80
+ Starting with |k8s-op-full| 1.25, you can use the Public Preview of
81
+ static containers instead of the existing non-static containers, which
82
+ downloads the MongoDB binary from |com| or the Internet at runtime.
83
+ You can use the procedures on this page to enable or disable static
84
+ containers for all or individual MongoDB deployments.
84
85
85
- Static containers use the image from the
86
- :qr-mdb:`mongodb-enterprise-server </mongodb-enterprise-server?tab=tags&tag=latest>`
87
- Quay.io repository.
86
+ Static containers use the image from the :qr-mdb:`mongodb-enterprise-server
87
+ </mongodb-enterprise-server?tab=tags&tag=latest>` Quay.io repository by
88
+ default, but you can use your own registry if you configured it for your
89
+ Kubernetes |k8s-nodes|.
88
90
89
91
.. _arch-static-containers:
90
92
@@ -112,23 +114,56 @@ Static Container Architecture
112
114
The static container architecture uses Kubernetes' :k8sdocs:`shared namespace feature </tasks/configure-pod-container/share-process-namespace/>`
113
115
to run the {+mdbagent+} as a separate process so it can control the full |mongod| lifecycle and avoid downloading files over a network.
114
116
115
- .. include:: /includes/static-containers-description.rst
116
-
117
117
.. figure:: /images/mdb-deployment-static.svg
118
118
:alt: Diagram showing the high-level architecture of a MongoDB deployment with
119
119
static containers configured using the MongoDB Enterprise Kubernetes Operator.
120
120
:figwidth: 600px
121
121
122
+ .. _local-remote-mode:
123
+
124
+ Compatibility With Local or Remote Mode
125
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126
+
127
+ If you use static containers, you don't need to configure |onprem| to
128
+ run in :ref:`Local Mode <deploy-om-container-local-mode>` or
129
+ :ref:`Remote Mode <deploy-om-container-remote-mode>`, unless you use
130
+ queryable backups. In static container architecture, the binaries
131
+ for the agent and ``mongod`` have their own container images and these
132
+ are not downloaded from |onprem|.
133
+
134
+ Queryable backups are the exception because in the non-static container
135
+ architecture, by default, the Backup Daemon downloads and runs the
136
+ MongoDB Server binaries for all versions that are backed-up. This
137
+ default MongoDB behavior undermines the fully static nature of the
138
+ containers used to run the Backup Daemon. If you use queryable backups,
139
+ you must still host the relevant MongoDB Server binaries using local or
140
+ remote mode. To learn more, see :ref:`deploy-om-container-local-mode` or
141
+ :ref:`deploy-om-container-remote-mode`.
142
+
143
+ If you used Remote or Local mode before and don't want to use queryable
144
+ backups, do the following to ensure that ``mongodb-enterprise-server``
145
+ `images <https://quay.io/repository/mongodb/mongodb-enterprise-server?tab=tags&tag=latest>`__
146
+ can be downloaded on the |k8s-nodes| used by the pods:
147
+
148
+ 1. Configure an internal container registry for your Kubernetes nodes.
149
+
150
+ The |k8s-nodes| will download the images from `Quay.io
151
+ <https://quay.io/repository/mongodb/mongodb-enterprise-server?tab=tags&tag=latest>`__
152
+ unless you use a local container registry.
153
+
154
+ 2. Download and add the ``mongodb-enterprise-server`` `images
155
+ <https://quay.io/repository/mongodb/mongodb-enterprise-server?tab=tags&tag=latest>`__.
156
+
122
157
.. _limitations-static-containers:
123
158
124
159
Limitations
125
160
~~~~~~~~~~~
126
161
127
162
If you enable static containers:
128
163
129
- - You must :ref:`disable-queryable-backups` so the :ref:`backup-daemon` doesn't
130
- attempt to download the MongoDB binaries from |onprem|, which undermines the immutable
131
- nature of static containers.
164
+ - You must :ref:`disable-queryable-backups` so the :ref:`backup-daemon`
165
+ doesn't attempt to download the MongoDB binaries from |onprem|, which
166
+ undermines the immutable nature of static containers.
132
167
133
168
- With |onprem|, only versions 6.0.24, 7.0.5, or later are compatible.
134
169
The {+k8s-op-short+} automatically uses the correct version of the
@@ -167,6 +202,33 @@ If you enable static containers:
167
202
health status file so you can't tell from the health status that a version change
168
203
happened, only the current health status.
169
204
205
+ FAQs
206
+ ~~~~
207
+
208
+ Do static containers support local or remote mode?
209
+ ``````````````````````````````````````````````````
210
+
211
+ No, if you use static containers, you don't need to configure |onprem|
212
+ to run in :ref:`Local Mode <deploy-om-container-local-mode>` or
213
+ :ref:`Remote Mode <deploy-om-container-remote-mode>` unless you use
214
+ queryable backups. To learn more, see :ref:`Local and Remote Modes
215
+ <local-remote-mode>`.
216
+
217
+ What are the changes for static containers?
218
+ ```````````````````````````````````````````
219
+
220
+ Static containers don't download the MongoDB binary at runtime.
221
+ Instead, it uses the images from the :qr-mdb:`mongodb-enterprise-server
222
+ </mongodb-enterprise-server?tab=tags&tag=latest>` Quay.io repository. To
223
+ learn more about the changes, see :ref:`step 6 <migrate-to-static-containers>`.
224
+
225
+ How can I verify if my deployment is running in static?
226
+ ```````````````````````````````````````````````````````
227
+
228
+ There are many ways to determine if your deployment is using static
229
+ container. To learn more, see :ref:`step 7
230
+ <migrate-to-static-containers>`.
231
+
170
232
.. _migrate-to-static-containers:
171
233
172
234
Migrate to Static Containers
@@ -175,7 +237,7 @@ Migrate to Static Containers
175
237
To migrate from non-static to static containers, set the {+mdbagent+} environment
176
238
variables and enable static containers by following the steps below.
177
239
You can also enable static containers during
178
- :ref:`installation <install-k8s>` or :ref:`upgrade <upgrade-k8s-operator>`.
240
+ :ref:`installation <install-k8s>` or :ref:`upgrade <upgrade-k8s-operator>`.
179
241
180
242
.. procedure::
181
243
:style: normal
@@ -186,6 +248,12 @@ You can also enable static containers during
186
248
187
249
Follow the procedure in :ref:`disable-queryable-backups`.
188
250
251
+ If you want to use :ref:`queryable backups
252
+ <configure-om-queryable-backups>`, you must configure |onprem|
253
+ resource to use :ref:`Local Mode <deploy-om-container-local-mode>`
254
+ or :ref:`Remote Mode <deploy-om-container-remote-mode>` so that
255
+ the binaries for all versions in-use can be pulled from |onprem|.
256
+
189
257
.. step:: Set environment variables for the {+mdbagent+} image.
190
258
191
259
.. tabs::
@@ -295,6 +363,32 @@ You can also enable static containers during
295
363
the {+mdbagent+} and another for the MongoDB database. This update initiates a
296
364
rolling restart.
297
365
366
+ When you migrate to static containers, the following changes apply:
367
+
368
+ - Kubernetes |k8s-nodes| use their configured container registry
369
+ to perform the downloads.
370
+ - Monitoring agent and automation agent versions are aligned.
371
+ - |k8s-op-short|, instead of the agent, handles MongoDB upgrades.
372
+ - |k8s-op-short| replaces the existing images, which will cause a
373
+ rolling restart.
374
+
375
+ .. step:: Verify that deployment is running in static.
376
+
377
+ - Check the value for one of the following variables, which you
378
+ must've set to ``static``:
379
+
380
+ .. list-table::
381
+ :widths: 60 30
382
+
383
+ * - ``MDB_DEFAULT_ARCHITECTURE``
384
+ - Variable for all deployments.
385
+ * - ``metadata.annotations[mongodb.com/v1.architecture]``
386
+ - Per-deployment variable.
387
+
388
+ - Check the database deployment to verify the usage of two separate
389
+ images, one for the agent and one for MongoDB, and ensure that no
390
+ init containers are deployed.
391
+
298
392
.. _migrate-to-non-static-containers:
299
393
300
394
Migrate to Non-Static Containers
0 commit comments