|
| 1 | +--- |
| 2 | +stepnum: 1 |
| 3 | +level: 4 |
| 4 | +ref: have-k8s-solution |
| 5 | +title: "Have a |k8s| solution available to use." |
| 6 | +content: | |
| 7 | +
|
| 8 | + If you need a |k8s| solution, see the |k8s| |
| 9 | + :k8sdocs:`documentation on picking the right solution </setup>`. |
| 10 | +
|
| 11 | +--- |
| 12 | +stepnum: 2 |
| 13 | +level: 4 |
| 14 | +ref: clone-k8s-repo |
| 15 | +title: "Clone the :gh:`MongoDB Enterprise Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes>`." |
| 16 | +content: | |
| 17 | +
|
| 18 | + .. code-block:: sh |
| 19 | +
|
| 20 | + git clone https://github.com/mongodb/mongodb-enterprise-kubernetes.git |
| 21 | +
|
| 22 | + .. note:: |
| 23 | +
|
| 24 | + You can use `Helm <https://helm.sh/>`__ to install the |
| 25 | + |k8s-op-short|. To learn how to install Helm, see its |
| 26 | + :gh:`documentation on GitHub </kubernetes/helm>`. |
| 27 | +
|
| 28 | +--- |
| 29 | +stepnum: 3 |
| 30 | +level: 4 |
| 31 | +ref: create-k8s-ns |
| 32 | +title: "Create a |k8s-ns| for your |k8s| deployment." |
| 33 | +content: | |
| 34 | +
|
| 35 | + By default, The |k8s-op-short| uses the ``mongodb`` namespace. To |
| 36 | + simplify your installation, consider creating a namespace labeled |
| 37 | + ``mongodb`` using the following |kubectl| command: |
| 38 | +
|
| 39 | + .. code-block:: sh |
| 40 | +
|
| 41 | + kubectl create namespace mongodb |
| 42 | +
|
| 43 | + If you do not want to use the ``mongodb`` namespace, you can label |
| 44 | + your namespace anything you like: |
| 45 | +
|
| 46 | + .. code-block:: sh |
| 47 | +
|
| 48 | + kubectl create namespace <namespaceName> |
| 49 | +
|
| 50 | +--- |
| 51 | +stepnum: 4 |
| 52 | +level: 4 |
| 53 | +ref: have-running-om |
| 54 | +title: "Have a running |onprem-link|." |
| 55 | +optional: true |
| 56 | +content: | |
| 57 | +
|
| 58 | + If you don't deploy an |onprem| resource with the |
| 59 | + |k8s-op-short|, you must have an |onprem| running outside of your |
| 60 | + |k8s| cluster. If you will deploy an |onprem| resource in |k8s| with |
| 61 | + the |k8s-op-short|, skip this prerequisite. |
| 62 | +
|
| 63 | + .. important:: |
| 64 | +
|
| 65 | + Your |onprem| installation must run an active |ntp| service. If |
| 66 | + the |onprem| host's clock falls out of sync, that host can't |
| 67 | + communicate with the |k8s-op-short|. |
| 68 | +
|
| 69 | + To learn how to check your |ntp| service for your Ops Manager |
| 70 | + host, see the documentation for |
| 71 | + `Ubuntu <https://help.ubuntu.com/lts/serverguide/NTP.html>`__ or |
| 72 | + `RHEL |
| 73 | + <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/s1-checking_the_status_of_ntp>`__. |
| 74 | +
|
| 75 | +--- |
| 76 | +stepnum: 5 |
| 77 | +level: 4 |
| 78 | +ref: create-k8s-secret |
| 79 | +title: "**Required for OpenShift Installs:** Create a |k8s-secret| that contains credentials authorized to pull images from the ``registry.connect.redhat.com`` repository." |
| 80 | +content: | |
| 81 | +
|
| 82 | + a. If you have not already, obtain a Red Hat subscription. |
| 83 | +
|
| 84 | + #. Create a `Registry Service Account <https://access.redhat.com/terms-based-registry/>`__. |
| 85 | +
|
| 86 | + #. Click on your Registry Service Account, then click the |
| 87 | + :guilabel:`Docker Configuration` tab. |
| 88 | +
|
| 89 | + #. Download the ``<account-name>-auth.json`` file and open it in a |
| 90 | + text editor. |
| 91 | +
|
| 92 | + #. Copy the ``registry.redhat.io`` object, and paste another instance |
| 93 | + of this object into the file. Remember to add a comma after the |
| 94 | + first object. Rename the second object |
| 95 | + ``registry.connect.redhat.com``, then save the file: |
| 96 | +
|
| 97 | + .. code-block:: json |
| 98 | + :emphasize-lines: 5-9 |
| 99 | +
|
| 100 | + { |
| 101 | + "auths": { |
| 102 | + "registry.redhat.io": { |
| 103 | + "auth": "<encoded-string>" |
| 104 | + }, |
| 105 | + "auths": { |
| 106 | + "registry.connect.redhat.com": { |
| 107 | + "auth": "<encoded-string>" |
| 108 | + } |
| 109 | + } |
| 110 | + } |
| 111 | +
|
| 112 | + #. Create a ``openshift-pull-secret.yaml`` file with the contents of |
| 113 | + the modified ``<account-name>-auth.json`` file as ``stringData`` |
| 114 | + named ``.dockerconfigjson``: |
| 115 | +
|
| 116 | + .. code-block:: yaml |
| 117 | + :emphasize-lines: 4-16 |
| 118 | +
|
| 119 | + apiVersion: v1 |
| 120 | + kind: Secret |
| 121 | + metadata: |
| 122 | + name: openshift-pull-secret |
| 123 | + stringData: |
| 124 | + .dockerconfigjson: | |
| 125 | + { |
| 126 | + "auths": { |
| 127 | + "registry.redhat.io": { |
| 128 | + "auth": "<encoded-string>" |
| 129 | + }, |
| 130 | + "registry.connect.redhat.com": { |
| 131 | + "auth": "<encoded-string>" |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + type: kubernetes.io/dockerconfigjson |
| 136 | +
|
| 137 | + The value you provide in the ``metadata.name`` field contains |
| 138 | + the secret name. Provide this value when asked for the |
| 139 | + ``<openshift-pull-secret>``. |
| 140 | +
|
| 141 | + #. Create a |k8s-secret| from the ``openshift-pull-secret.yaml`` |
| 142 | + file: |
| 143 | +
|
| 144 | + .. code-block:: sh |
| 145 | +
|
| 146 | + oc apply -f openshift-pull-secret.yaml -n <namespace> |
| 147 | +
|
| 148 | +... |
0 commit comments