|
| 1 | +1. Change to the directory in which you cloned the |k8s-op-short| |
| 2 | + repository. The following steps depend on how your environment is |
| 3 | + configured: |
| 4 | + |
| 5 | +.. tabs:: |
| 6 | + |
| 7 | + tabs: |
| 8 | + - id: kubectl |
| 9 | + name: Online using kubectl |
| 10 | + content: | |
| 11 | + |
| 12 | + .. _upgrade-k8s-operator-kubectl: |
| 13 | + |
| 14 | + 2. Upgrade the |k8s-crds| for MongoDB deployments using the |
| 15 | + following |kubectl| command: |
| 16 | + |
| 17 | + .. code-block:: sh |
| 18 | +
|
| 19 | + kubectl apply -f crds.yaml |
| 20 | +
|
| 21 | + #. If you use `OpenShift <https://www.openshift.com/>`__ as |
| 22 | + your |k8s| orchestrator, you need to allow OpenShift to |
| 23 | + manage the Security Context for the |k8s-op-short|. |
| 24 | + |
| 25 | + Change the ``MANAGED_SECURITY_CONTEXT`` value as described |
| 26 | + in the next step. |
| 27 | + |
| 28 | + #. You can edit the Operator |yaml| file to further customize |
| 29 | + your Operator before upgrading it. |
| 30 | + |
| 31 | + a. Open your ``mongodb-enterprise.yaml`` in your preferred |
| 32 | + text editor. |
| 33 | + |
| 34 | + #. You may need to add one or more of the following |
| 35 | + options: |
| 36 | + |
| 37 | + .. include:: /includes/list-table-k8s-kubectl-install-options.rst |
| 38 | + |
| 39 | + .. note:: |
| 40 | + |
| 41 | + Any values enclosed in single or double quotes |
| 42 | + *require* those quotes. Include the quotes when |
| 43 | + setting these values. |
| 44 | + |
| 45 | + #. Upgrade the |k8s-op-short| using the following |
| 46 | + |kubectl| command: |
| 47 | + |
| 48 | + .. code-block:: sh |
| 49 | +
|
| 50 | + kubectl apply -f mongodb-enterprise.yaml |
| 51 | +
|
| 52 | + To troubleshoot your |k8s-op-short|, see |
| 53 | + :ref:`review-k8s-op-logs`. |
| 54 | + |
| 55 | + .. include:: /includes/fact-remove-k8s-resources-first.rst |
| 56 | + |
| 57 | + - id: helmonline |
| 58 | + name: Online using Helm |
| 59 | + content: | |
| 60 | + |
| 61 | + .. _upgrade-k8s-operator-helm: |
| 62 | + |
| 63 | + 2. Upgrade the latest version of the |k8s-op-short| using the |
| 64 | + following ``helm`` command: |
| 65 | + |
| 66 | + .. code-block:: sh |
| 67 | +
|
| 68 | + helm template public/helm_chart > operator.yaml |
| 69 | + kubectl apply -f operator.yaml |
| 70 | +
|
| 71 | + You can customize your Chart before installing it by using |
| 72 | + the ``--set`` option. For this Chart, you may need to add |
| 73 | + one or more of the following options: |
| 74 | + |
| 75 | + .. include:: /includes/list-table-k8s-helm-install-options-online.rst |
| 76 | + |
| 77 | + To troubleshoot your |k8s-op-short|, see |
| 78 | + :ref:`review-k8s-op-logs`. |
| 79 | + |
| 80 | + .. include:: /includes/fact-remove-k8s-resources-first.rst |
| 81 | + |
| 82 | + - id: helmoffline |
| 83 | + name: Offline using Helm and Docker |
| 84 | + content: | |
| 85 | + |
| 86 | + To upgrade the |k8s-op-short| on a host not connected to the |
| 87 | + Internet, you have two options, you can download the |
| 88 | + |k8s-op-short| files from either: |
| 89 | + |
| 90 | + .. tabs:: |
| 91 | + |
| 92 | + tabs: |
| 93 | + - id: internet |
| 94 | + name: The Internet |
| 95 | + content: | |
| 96 | + |
| 97 | + 2. Upgrade the latest version of the |k8s-op-short| |
| 98 | + with modified pull policy values using the |
| 99 | + following ``helm`` command: |
| 100 | + |
| 101 | + .. code-block:: sh |
| 102 | +
|
| 103 | + helm template --set registry.pullPolicy=IfNotPresent \ |
| 104 | + public/helm_chart > operator.yaml |
| 105 | + kubectl apply -f operator.yaml |
| 106 | +
|
| 107 | + You can further customize your Chart before |
| 108 | + installing it by using the ``--set`` option. For |
| 109 | + this Chart, you may need to add one or more of the |
| 110 | + following options: |
| 111 | + |
| 112 | + .. include:: /includes/list-table-k8s-helm-install-options-offline.rst |
| 113 | + |
| 114 | + To troubleshoot your |k8s-op-short|, see |
| 115 | + :ref:`review-k8s-op-logs`. |
| 116 | + |
| 117 | + .. include:: /includes/fact-remove-k8s-resources-first.rst |
| 118 | + |
| 119 | + - id: host |
| 120 | + name: Another Host |
| 121 | + content: | |
| 122 | + |
| 123 | + 2. Upgrade the latest version of the |k8s-op-short| |
| 124 | + with modified pull policy values using the |
| 125 | + following ``helm`` command: |
| 126 | + |
| 127 | + .. code-block:: sh |
| 128 | +
|
| 129 | + helm template --set registry.pullPolicy=IfNotPresent \ |
| 130 | + public/helm_chart > operator.yaml |
| 131 | + kubectl apply -f operator.yaml |
| 132 | +
|
| 133 | + You can further customize your Chart before |
| 134 | + installing it by using the ``--set`` option. For |
| 135 | + this Chart, you may need to add one or more of the |
| 136 | + following options: |
| 137 | + |
| 138 | + .. include:: /includes/list-table-k8s-helm-install-options-offline.rst |
0 commit comments