|
| 1 | +.. _reference-architectures-deploy-operator-no-mesh: |
| 2 | + |
| 3 | +============================================================= |
| 4 | +Deploy the |k8s-op| Without a Service Mesh |
| 5 | +============================================================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. facet:: |
| 10 | + :name: genre |
| 11 | + :values: tutorial |
| 12 | + |
| 13 | +.. contents:: On this page |
| 14 | + :local: |
| 15 | + :backlinks: none |
| 16 | + :depth: 1 |
| 17 | + :class: singlecol |
| 18 | + |
| 19 | + |
| 20 | +In order to deploy multiple instances of MongoDB resources across multiple |
| 21 | +|k8s| clusters, you first need to deploy the |k8s-op-short| to one of your |
| 22 | +|k8s| clusters. Once the |k8s-op-short| is deployed to your operator |k8s| cluster, |
| 23 | +you can then create and manage all of your MongoDB resources across all of your |
| 24 | +|k8s| clusters by applying updates to your operator |k8s| cluster. |
| 25 | + |
| 26 | +Prerequisites |
| 27 | +------------- |
| 28 | + |
| 29 | +Before you begin the following procedure, perform the following actions: |
| 30 | + |
| 31 | +- Install ``kubectl``. |
| 32 | +- |helm-install|. |
| 33 | +- Complete the :ref:`GKE Clusters procedure <reference-architectures-gke-clusters>` or the equivalent. |
| 34 | +- Complete the :ref:`TLS Certificates procedure <reference-architectures-ca-certs>` or the equivalent. |
| 35 | +- Complete the :ref:`Istio Service mesh procedure <reference-architectures-istio-service-mesh>` or the equivalent. |
| 36 | +- Install the |kubectl-mongodb|. |
| 37 | + To install the |kubectl-mongodb|: |
| 38 | + |
| 39 | + .. include:: /includes/steps/install-kubectl-mongodb-plugin.rst |
| 40 | +- Update as needed and set the environment variables defined in the following ``env_variables.sh`` file. |
| 41 | + |
| 42 | + .. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/env_variables.sh |
| 43 | + :language: bash |
| 44 | + :linenos: |
| 45 | + |
| 46 | +Source Code |
| 47 | +----------- |
| 48 | + |
| 49 | +You can find all included source code in the :github:`MongoDB Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes/tree/{+github-branch+}/architectures/setup-multi-cluster/setup-operator>`. |
| 50 | + |
| 51 | +Procedure |
| 52 | +--------- |
| 53 | + |
| 54 | +.. procedure:: |
| 55 | + :style: normal |
| 56 | + |
| 57 | + .. step:: Create namespaces for the |k8s-op-short|, MongoDB and |onprem| in each of your |k8s| clusters. |
| 58 | + |
| 59 | + .. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0045_create_namespaces.sh |
| 60 | + :language: bash |
| 61 | + |
| 62 | + .. step:: Create image pull secrets. |
| 63 | + |
| 64 | + .. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0046_create_image_pull_secrets.sh |
| 65 | + :language: bash |
| 66 | + |
| 67 | + .. step:: Configure your |k8s| clusters. |
| 68 | + |
| 69 | + Run the following command to configure your |k8s| clusters. |
| 70 | + |
| 71 | + .. io-code-block:: |
| 72 | + :copyable: true |
| 73 | + |
| 74 | + .. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0200_kubectl_mongodb_configure_multi_cluster.sh |
| 75 | + :language: bash |
| 76 | + :linenos: |
| 77 | + |
| 78 | + .. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0200_kubectl_mongodb_configure_multi_cluster.out |
| 79 | + :visible: false |
| 80 | + |
| 81 | + .. step:: Add the MongoDB Helm Charts for |k8s|. |
| 82 | + |
| 83 | + Add the `MongoDB Helm Charts for Kubernetes <https://mongodb.github.io/helm-charts>`__ repository to Helm. |
| 84 | + |
| 85 | + .. io-code-block:: |
| 86 | + :copyable: true |
| 87 | + |
| 88 | + .. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0205_helm_configure_repo.sh |
| 89 | + :language: bash |
| 90 | + :linenos: |
| 91 | + |
| 92 | + .. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0205_helm_configure_repo.out |
| 93 | + :visible: false |
| 94 | + |
| 95 | + .. step:: Deploy the |k8s-op-short|. |
| 96 | + |
| 97 | + Use the `MongoDB Helm Charts for Kubernetes <https://mongodb.github.io/helm-charts>`__ to deploy the |k8s-op-short|. |
| 98 | + |
| 99 | + .. io-code-block:: |
| 100 | + :copyable: true |
| 101 | + |
| 102 | + .. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0210_helm_install_operator.sh |
| 103 | + :language: bash |
| 104 | + :linenos: |
| 105 | + |
| 106 | + .. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0210_helm_install_operator.out |
| 107 | + :visible: false |
| 108 | + |
| 109 | + .. step:: Check the status of your |k8s-op|. |
| 110 | + |
| 111 | + .. io-code-block:: |
| 112 | + :copyable: true |
| 113 | + |
| 114 | + .. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0211_check_operator_deployment.sh |
| 115 | + :language: bash |
| 116 | + :linenos: |
| 117 | + |
| 118 | + .. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0211_check_operator_deployment.out |
| 119 | + :visible: false |
0 commit comments