Skip to content

Commit 31039d5

Browse files
JuliaMongoerabil-mdblmkerbey-mdb
authored andcommitted
Merging the multi-cluster-ga branch into master (#1265)
* (DOCSP-27139) Deploy a multi-cluster replica set with statefulSet override (#1212) * (DOCSP-27139) Deploy a multi-cluster replica set with statefulSet override * Renamed the multi-cluster resource * Refactoring, to make the prereqs apply to both quickstart and regular procedure * (DOCSP-27918) Adds multi-cluster limitation for secret storage. * (DOCSP-27855) Adds limitation for multi-cluster OM. Breaks out OM limitation and removes Vault references. * (DOCSP-28415) Adds no Prometheus limitation. * (DOCSP-27827) Describes new CLUSTER_CLIENT_TIMEOUT var for multi-cluster. * (DOCSP-27653) Update Istio info, for GA (#1251) * (DOCSP-27653) Istio updates for GA * (DOCSP-27784) Renaming the MongoDBMulti to MongoDBMultiCluster (#1255) * (DOCSP-27784) Renaming the MongoDBMulti to MongoDBMultiCluster. Removes the word "beta". * (DOCSP-27759) Rename multi-cluster CLI to mongodb kubectl plugin, update plugin's options and add plugin install to prereqs (#1257) * (DOCSP-28373) MEKO Multi-Cluster RBAC Configuration (#1259) * (DOCSP-27825) OM in multi-clusters (#1261) and the OM HA limitation * (DOCSP-28373-follow) Changing links to reflect eventual public file locations. (#1262) * (DOCSP-27856) Adds multi-cluster resource specifications. (#1245) * (DOCSP-27856) Adds multi-cluster CRD. * (DOCSP-28445) Modify a MongoDBMultiCluster Resource (#1264) * (DOCSP-28445) Modify a MongoDBMultiCluster Resource --------- Co-authored-by: Evelyn Rabil <[email protected]> Co-authored-by: lmkerbey-mdb <[email protected]> Co-authored-by: Evelyn Rabil <[email protected]>
1 parent b397043 commit 31039d5

File tree

77 files changed

+2871
-951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2871
-951
lines changed

conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@
147147
'.. |k8s-crd| replace:: `CustomResourceDefinition <https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/>`__',
148148
'.. |k8s-mdbrscs| replace:: MongoDB Kubernetes resources',
149149
'.. |k8s-mdbrsc| replace:: MongoDB Kubernetes resource',
150+
'.. |mongodb-multi| replace:: ``MongoDBMultiCluster`` resource',
151+
'.. |mongodb-multis| replace:: ``MongoDBMultiCluster`` resources',
150152
'.. |k8s-nodes| replace:: `nodes <https://kubernetes.io/docs/concepts/architecture/nodes/>`__',
151153
'.. |k8s-node| replace:: `node <https://kubernetes.io/docs/concepts/architecture/nodes/>`__',
152154
'.. |k8s-nss| replace:: `namespaces <https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/>`__',
@@ -192,9 +194,8 @@
192194
'.. |Multi-cluster| replace:: Multi-Kubernetes-cluster deployment',
193195
'.. |multi-clusters| replace:: multi-Kubernetes-cluster deployments',
194196
'.. |Multi-clusters| replace:: Multi-Kubernetes-cluster deployments',
195-
'.. |mc-cli| replace:: multi-cluster CLI',
196-
'.. |Mc-cli| replace:: Multi-cluster CLI',
197197
'.. |oc| replace:: :xml:`<mono><link target="https://docs.openshift.com/container-platform/4.12/cli_reference/index.html">oc</link></mono>`',
198+
'.. |kubectl-mongodb| replace:: ``kubectl mongodb`` plugin',
198199
'.. |onprem| replace:: Ops Manager',
199200
'.. |onprem-link| replace:: :opsmgr:`Ops Manager </>`',
200201
'.. |nfs| replace:: :abbr:`NFS (Network File System)`',

config/redirects

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ symlink: stable -> v1.18
1212
# Base URL
1313
raw: docs/kubernetes-operator/ -> ${base}/stable/
1414

15+
# Add redirects for the renaming of the multi-cluster CLI to MongoDB kubectl
16+
plugin, starting with version 1.19 and later:
17+
[v1.19-*]: docs/kubernetes-operator/${version}/multi-cluster-cli-reference -> ${base}/stable/plugin-reference/
18+
[v1.19-*]: docs/kubernetes-operator/${version}/multi-cluster-quick-start-prerequisites -> ${base}/stable/multi-cluster-prerequisites/
19+
[v1.19-*]: docs/kubernetes-operator/${version}/central-and-member-clusters -> ${base}/stable/multi-cluster/multi-cluster-overview/
20+
[*-v1.19]: docs/kubernetes-operator/${version}/tutorial/multi-cluster-edit-deployment -> ${base}/tutorial/multi-cluster-deploy-replica-set/
21+
1522
# Add redirects for the complete removal of old-style tls certs and the EOL of MEKO # v1.11 that required special treatment of appdb version:
1623
[v1.17-*]: docs/kubernetes-operator/${version}/tutorial/migrate-to-ent-appdb-version -> ${base}/stable/release-notes/#k8s-op-full-1-11-0/
1724
[v1.17-*]: docs/kubernetes-operator/${version}/tutorial/migrate-to-new-tls-format -> ${base}/stable/release-notes/#k8s-op-full-1-13-0/

source/faq.txt

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ Frequently Asked Questions
1818
What is an Operator?
1919
--------------------
2020

21-
An operator is a standard mechanism that extends the control plane of
22-
|k8s| to managing custom |k8s| resources. Because each operator is
23-
built for its own Custom Resources (CRs), it can contain logic that
24-
addresses the type of service that the operator is built for. For the
25-
|k8s-op-short|, the operator includes the logic for the deployment of
21+
An operator is a standard mechanism that extends the control plane of
22+
|k8s| to managing custom |k8s| resources. Because each operator is
23+
built for its own Custom Resources (CRs), it can contain logic that
24+
addresses the type of service that the operator is built for. For the
25+
|k8s-op-short|, the operator includes the logic for the deployment of
2626
MongoDB Server and Ops Manager instances.
2727

2828
Each CR used by the |k8s-op-short| represents an element of a MongoDB
2929
Server deployment in |k8s|, and has options for customizing that part
3030
of the deployment. Once you configure these objects in the |k8s|
3131
deployment, the operator builds native |k8s| objects, such as Stateful
3232
Sets that are necessary to create Pods according to your specified
33-
requirements for MongoDB Servers. The operator also facilitates
33+
requirements for MongoDB Servers. The |k8s-op-short| also facilitates
3434
configuration of MongoDB Server features, such as database backups,
3535
through interaction with |cloud| or |onprem|.
3636

@@ -41,41 +41,35 @@ When you deploy MongoDB Server or MongoDB Enterprise Advanced in |k8s|
4141
through the |k8s-op-full|, your deployments can benefit from the
4242
resilience and simple orchestration that |k8s| provides.
4343

44-
The only supported way to deploy MongoDB Enterprise Advanced in |k8s| is
45-
through the |k8s-op-full|. The |k8s-op-full| simplifies your daily
46-
workflows and makes it easier for MongoDB technical support staff to
47-
assist you when needed.
44+
The only supported way to deploy MongoDB Enterprise Advanced in |k8s| is
45+
through the |k8s-op-full|. The |k8s-op-full| simplifies your daily workflows
46+
and makes it easier for MongoDB technical support staff to assist you when needed.
4847

4948
Which |k8s| platforms are supported for MongoDB Server deployments?
5049
-------------------------------------------------------------------------
5150

52-
MongoDB Server supports any platform that builds upon native |k8s|
53-
without changing the default logic or behavior. In practice, this means
54-
that MongoDB Server supports any |k8s| platform
55-
`certified by the Cloud Native Computing Foundation <https://www.cncf.io/certification/software-conformance/>`_.
56-
To learn more, see
57-
:ref:`MongoDB Kubernetes Operator Compatibility <k8s-compatibility>`.
51+
MongoDB Server supports any platform that builds upon native |k8s| without
52+
changing the default logic or behavior. In practice, this means that
53+
MongoDB Server supports any |k8s| platform
54+
`certified by the Cloud Native Computing Foundation <https://www.cncf.io/certification/software-conformance/>`__.
55+
To learn more, see :ref:`MongoDB Kubernetes Operator Compatibility <k8s-compatibility>`.
5856

5957
How many deployments can |k8s-op-full| support?
6058
-----------------------------------------------
6159

62-
|k8s-op-short| can support up to 50 deployments. However, changes made
63-
to large numbers of deployments at the same time result in long
64-
reconciliation times. To avoid prolonged reconciliation times, limit a
65-
given |k8s-op-short| instance to 20 deployments. To learn more,
66-
see the :ref:`production notes <deploy_recommended-number-sets>`.
60+
|k8s-op-short| can support up to 50 deployments. However, changes made to
61+
large numbers of deployments at the same time result in long reconciliation times.
62+
To avoid prolonged reconciliation times, limit a given |k8s-op-short| instance
63+
to 20 deployments. To learn more, see the :ref:`production notes <deploy_recommended-number-sets>`.
6764

6865
Should I run MongoDB Server in |k8s| in the same cluster as the application using it?
6966
--------------------------------------------------------------------------------------
7067

71-
To help minimize latency, consider colocating your database and
72-
applications on the same |k8s| cluster if your deployment architecture
73-
allows this.
68+
To help minimize latency, consider colocating your database and applications on
69+
the same |k8s| cluster if your deployment architecture allows this.
7470

7571
Can I deploy MongoDB Server across multiple |k8s| clusters?
7672
-----------------------------------------------------------
7773

78-
This feature is available in Beta releases, as described in
79-
:ref:`Deploy MongoDB Resources on Multiple Kubernetes Clusters <multi-cluster>`.
80-
To learn more,
81-
`contact Support <https://cloud.mongodb.com/links/support>`_.
74+
Yes. To learn more, see :ref:`Deploy MongoDB Resources on Multiple Kubernetes Clusters <multi-cluster>`.
75+
For help, `contact MongoDB Support <https://cloud.mongodb.com/links/support>`__.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
If you are deploying an |onprem| resource on a |multi-cluster|:
2+
3+
- Set the ``context`` to the name of the central cluster, such as:
4+
``kubectl config set context "$MDB_CENTRAL_CLUSTER_FULL_NAME"``.
5+
6+
- Set the ``--namespace`` to the same :ref:`scope <mc-namespace-scope-ref>`
7+
that you used for your |multi-cluster|, such as: ``kubectl config --namespace "mongodb"``.
8+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
To connect member clusters to the |onprem| resource's deployment in the
2+
central cluster in a |multi-cluster|, use one of the following methods:
3+
4+
- Set the :opsmgrkube:`spec.externalConnectivity` to ``true`` and specify
5+
the |onprem| port in it. Use the :github:`ops-manager-external.yaml
6+
</mongodb/mongodb-enterprise-kubernetes/blob/master/samples/ops-manager/ops-manager-external.yaml>`
7+
example script, modify it to your needs, and apply the configuration.
8+
For example, run:
9+
10+
.. code-block:: sh
11+
12+
kubectl apply \
13+
--context "$MDB_CENTRAL_CLUSTER_FULL_NAME" \
14+
--namespace "mongodb" \
15+
-f https://raw.githubusercontent.com/mongodb/mongodb-enterprise-kubernetes/master/samples/ops-manager/ops-manager-external.yaml
16+
17+
- Add the central cluster and all member clusters to the service mesh.
18+
The service mesh establishes communication from the central and all
19+
member clusters to the |onprem| instance. To learn more, see the
20+
:ref:`Multi-Kubernetes-Cluster Quick Start <multi-cluster-quick-start-ref>`
21+
procedures and see the step that references the ``istio-injection=enabled``
22+
label for Istio. Also, see `Automatic sidecar injection
23+
<https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection>`__
24+
in the Istio documentation.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
If you are deploying an |onprem| resource on a |multi-cluster|, run:
2+
3+
.. code-block:: sh
4+
5+
kubectl apply \
6+
--context "$MDB_CENTRAL_CLUSTER_FULL_NAME" \
7+
--namespace "mongodb"
8+
-f https://raw.githubusercontent.com/mongodb/mongodb-enterprise-kubernetes/master/samples/ops-manager/ops-manager-external.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
To check the status of your |mongodb-multi|, use the following command on the central cluster:
2+
3+
.. code-block:: sh
4+
5+
kubectl get mdbm <resource-name> -o yaml -w
6+
7+
With the ``-w`` (watch) flag set, when the configuration changes, the output
8+
refreshes immediately until the status phase achieves the ``Running`` state.
9+
To learn more about resource deployment statuses, see :doc:`/reference/troubleshooting`.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
To check the status of your |k8s-mdbrsc|, invoke the following
1+
To check the status of your |k8s-mdbrsc|, use the following
22
command:
33

44
.. code-block:: sh
55
66
kubectl get mdb <resource-name> -o yaml -w
77
8-
The ``-w`` flag means "watch". With the "watch" flag set, the output
9-
refreshes immediately when the configuration changes until the status phase
10-
achieves the ``Running`` state.
11-
12-
See :doc:`/reference/troubleshooting` for information about the resource
13-
deployment statuses.
8+
With the ``-w`` (watch) flag set, when the configuration changes, the output
9+
refreshes immediately until the status phase achieves the ``Running`` state.
10+
To learn more about resource deployment statuses, see :doc:`/reference/troubleshooting`.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
# Provides statefulSet override per cluster
3+
4+
apiVersion: mongodb.com/v1
5+
kind: MongoDBMultiCluster
6+
metadata:
7+
name: multi-replica-set
8+
spec:
9+
version: 4.4.0-ent
10+
type: ReplicaSet
11+
duplicateServiceObjects: false
12+
credentials: my-credentials
13+
opsManager:
14+
configMapRef:
15+
name: my-project
16+
clusterSpecList:
17+
- clusterName: cluster1.example.com
18+
members: 2
19+
statefulSet:
20+
spec:
21+
template:
22+
spec:
23+
containers:
24+
- name: sidecar1
25+
image: busybox
26+
command: [ "sleep" ]
27+
args: [ "infinity" ]
28+
# Use to override the default storage size of the "data" Persistent Volume
29+
volumeClaimTemplates:
30+
- metadata:
31+
name: data
32+
spec:
33+
resources:
34+
requests:
35+
storage: 1Gi
36+
- clusterName: cluster2.example.com
37+
members: 1
38+
statefulSet:
39+
spec:
40+
template:
41+
spec:
42+
containers:
43+
- name: sidecar2
44+
image: busybox
45+
command: [ "sleep" ]
46+
args: [ "infinity" ]
47+
volumeClaimTemplates:
48+
- metadata:
49+
name: data
50+
spec:
51+
resources:
52+
requests:
53+
storage: 1Gi
54+
- clusterName: cluster3.example.com
55+
members: 1
56+
statefulSet:
57+
spec:
58+
template:
59+
spec:
60+
containers:
61+
- name: sidecar3
62+
image: busybox
63+
command: [ "sleep" ]
64+
args: [ "infinity" ]
65+
volumeClaimTemplates:
66+
- metadata:
67+
name: data
68+
spec:
69+
resources:
70+
requests:
71+
storage: 1Gi
72+
73+
...

source/includes/code-examples/yaml-files/example-watch-namespaces-env-helm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. example::
22

33
.. code-block:: yaml
4-
:emphasize-lines: 3
54

65
# Operator with name `mongodb-enterprise-operator-qa-envs` will
76
# watch ns-dev, ns-qa and ns-uat namespaces

source/includes/code-examples/yaml-files/example-watch-namespaces-staging-only-helm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. example::
22

33
.. code-block:: yaml
4-
:emphasize-lines: 3
54

65
# Operator with name `mongodb-enterprise-operator-staging` will
76
# watch ns-staging and ns-pre-prod

source/includes/code-examples/yaml-files/example-watch-one-namespace-helm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. example::
22

33
.. code-block:: yaml
4-
:emphasize-lines: 2
54

65
# Watch one namespace
76
helm install enterprise-operator mongodb/enterprise-operator \

source/includes/code-examples/yaml-files/example-watch-two-namespaces-helm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. example::
22

33
.. code-block:: yaml
4-
:emphasize-lines: 2
54

65
# Watch both namespace-a and namespace-b
76
helm install enterprise-operator mongodb/enterprise-operator \
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
A |multi-cluster| that uses the |k8s-op-full| consists of one
2+
**central cluster** and one or more **member clusters** in |k8s|:
3+
4+
- The **central cluster** has the following role:
5+
6+
- Hosts the |k8s-op-full|
7+
- Acts as the control plane for the |multi-cluster|
8+
- Hosts the |mongodb-multi| spec for the MongoDB replica set
9+
- Hosts |onprem|, if you deploy |onprem| with the |k8s-op-short|
10+
- Can also host members of the MongoDB replica set
11+
12+
- **Member clusters** host the MongoDB replica sets.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
The :github:`MongoDB Enterprise Kubernetes Operator </mongodb/mongodb-enterprise-kubernetes>`
2+
creates |k8s| |k8s-statefulsets| from specification files that you write.
3+
4+
The |k8s-op-short| creates MongoDB-specific resources in |k8s| as
5+
:k8sdocs:`custom resources </concepts/extend-kubernetes/api-extension/custom-resources/>`.
6+
7+
To manage these custom resources, use the following process:
8+
9+
1. Create or update a |k8s-mdbrsc| specification.
10+
2. Direct |k8s-op-full| to apply it to your |k8s| environment.
11+
As a result, |k8s-op-short| performs these actions:
12+
13+
- Creates the defined |k8s-statefulsets|, services and other |k8s| resources.
14+
- Updates the |onprem-link| deployment configuration to reflect changes.

source/includes/facts/fact-istio.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
We offer the :github:`install_istio_separate_network example script
2+
</mongodb/mongodb-enterprise-kubernetes/blob/master/tools/multicluster/install_istio_separate_network.sh>`.
3+
This script is based on Istio documentation and provides an example installation
4+
that uses the `multi-primary mode on different networks <https://istio.io/latest/docs/setup/install/multicluster/multi-primary_multi-network/>`__.
5+
6+
We don't guarantee the script's maintenance with future Istio releases.
7+
If you choose to use the script, review the latest Istio documentation for
8+
`installing a multicluster <https://istio.io/latest/docs/setup/install/multicluster/>`__,
9+
and, if necessary, adjust the script to match the documentation and your deployment.
10+
11+
If you use another service mesh solution, create your own script for
12+
configuring separate networks to facilitate DNS resolution.

source/includes/facts/fact-multi-cluster-cli-actions-setup.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Use the |kubectl-mongodb| to:
2+
3+
- :ref:`Set up multi-Kubernetes-cluster Deployments <multi-cluster-quick-start-ref>`
4+
- :ref:`Run automatic and manual disaster recovery <disaster-recovery-ref>`
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- Creates a default ConfigMap named ``mongodb-enterprise-operator-member-list``
2+
that contains all the member clusters of the |multi-cluster|. This name is
3+
hard-coded and you can't change it. See :ref:`Known Issues <hardcoded_configmap_multi-clusters>`.
4+
- Creates |k8s-service-accounts|, Roles, and RoleBindings in the central
5+
cluster and each member cluster.
6+
- Applies the correct permissions for service accounts.
7+
- Uses the preceding settings to create your |multi-cluster|.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
To deploy an |onprem| instance in the central cluster and connect to it,
2+
use the following procedures:
3+
4+
- :ref:`Review the Ops Manager resource architecture <meko-om-arch>`
5+
- :ref:`Review the Ops Manager resource considerations and prerequisites <plan-om-resource>`
6+
- :ref:`Deploy an Ops Manager instance on the central cluster with TLS encryption <deploy-om-container>`
7+
8+
These procedures are the same as the procedures for single clusters
9+
deployed with the |k8s-op-short| with the following exceptions:
10+
11+
- Run the procedures to deploy |onprem| only on the central cluster of your |multi-cluster|.
12+
13+
- Set the context and the |k8s-ns|.
14+
15+
.. include:: /includes/admonitions/note-om-context-scope-multi-cluster.rst
16+
17+
- Configure external connectivity for |onprem|.
18+
19+
.. include:: /includes/admonitions/note-om-external-connectivity-multi-cluster.rst

source/includes/list-tables/multi-cluster-cli-central-cluster.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Required. Namespace that the |k8s-op-short|
22
will be deployed to, such as:
3-
``-central-cluster-namespace="mongodb"``.
3+
``--central-cluster-namespace="mongodb"``.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Required. Central cluster that the |k8s-op-short|
2+
will be deployed in, such as:
3+
``--central-cluster="MDB_CENTRAL_CLUSTER_FULL_NAME"``.

0 commit comments

Comments
 (0)