You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,22 +21,74 @@ You'll need a `Kubernetes cluster <https://kubernetes.io/docs/setup/>`__ running
21
21
Install the operators
22
22
---------------------
23
23
24
-
Operators are installed using ``kubectl``, and each operator is created in its own namespace. You can install and run multiple Mattermost installations in the same cluster using different namespaces.
24
+
Nginx Ingress Controller
25
+
~~~~~~~~~~~~~~~~~~~~~~~~
26
+
See the `Kubernetes deployment documentation <https://kubernetes.github.io/ingress-nginx/deploy/>`__ for details on installing the NGINX ingress controller in your Kubernetes cluster.
25
27
26
-
1. Install NGINX ingress controller by following the instructions `here <https://kubernetes.github.io/ingress-nginx/deploy/>`__.
28
+
Mattermost Operator
29
+
~~~~~~~~~~~~~~~~~~~
27
30
28
-
2. Install the Mattermost Operator:
31
+
There are multiple ways to install the Mattermost Kubernetes Operator. We recommend deploying with Helm, but installation instructions via the Kubernetes CLI can also be found below.
32
+
33
+
With Helm
34
+
^^^^^^^^^
35
+
36
+
37
+
1. Install Helm. We recommend Helm v3.13.0 or later. For installation instructions, see the `Helm quickstart documentation <https://docs.helm.sh/using_helm/#quickstart>`__.
38
+
2. Once Helm is installed and initialized, run the following:
3. Create a file named ``config.yaml``, then copy and paste the content of `the Mattermost operator file <https://github.com/mattermost/mattermost-helm/blob/master/charts/mattermost-operator/values.yaml>`__ into it.
46
+
47
+
48
+
4. Create a namespace for the Mattermost Operator:
If no version is specified, the latest version of the Mattermost Operator will be installed.
78
+
79
+
With Kubernetes CLI
80
+
^^^^^^^^^^^^^^^^^^^
81
+
82
+
Operators are installed using ``kubectl``, and each operator is created in its own namespace. You can install and run multiple Mattermost installations in the same cluster using different namespaces.
38
83
39
-
To install the operators using the Mattermost Operator Helm chart, follow the instructions `here <https://github.com/mattermost/mattermost-helm/tree/master/charts/mattermost-operator>`__. See the `Kubernetes YAML file <https://github.com/mattermost/mattermost-operator/blob/0f2c7b1a182598c4399449eb17a6557187175082/apis/mattermost/v1beta1/mattermost_types.go#L308C2-L309C14>`__ documentation within the ``mattermost`` GitHub repository for details on working with the YAML file.
2. Create an installation manifest file locally in a text editor by copying and pasting contenst from the Mattermost installation manifest, and adjusting fields for your configuration and environment.
109
+
2. Create an installation manifest file ``mattermost-installation.yaml`` locally, and open it with a text editor. Copy and paste the YAML structure below, and make any necessary adjustments for your configuration and environment.
58
110
59
111
.. code-block:: yaml
60
112
:class: mm-code-block
@@ -73,7 +125,8 @@ Deploy Mattermost
73
125
version: <VERSION_HERE> # Select a recent supported version of Mattermost. Example = 9.3.0
74
126
licenseSecret: ""# If you created a license secret in step 1, put the secret name here
75
127
76
-
Save the file as ``mattermost-installation.yaml``. While recommended file names are provided, your naming conventions may differ.
128
+
.. note::
129
+
While file names are provided, your file names can be different. The file names in this tutorial are used for clarity and organization.
77
130
78
131
Some of the most commonly-used fields include:
79
132
@@ -83,13 +136,43 @@ Deploy Mattermost
83
136
"metadata.name", "The name of your Mattermost as it will be shown in Kubernetes. The shorter the better."
84
137
"spec.size", "The size of your installation. This can be '100users', '1000users, '5000users', '10000users', or '25000users'."
85
138
"spec.ingress.host", "The DNS for your Mattermost installation."
86
-
"spec.version", "The Mattermost version. Refer to `the version archive page <https://docs.mattermost.com/upgrade/version-archive.html>`__ when selecting a mattermost version."
87
-
"spec.licenseSecret", "The name of the Kubernetes secret containing your license (e.g. mattermost-license). Required for Enterprise deployments."
139
+
"spec.version", "The Mattermost version. Refer to `the version archive page <https://docs.mattermost.com/upgrade/version-archive.html>`__ when selecting a Mattermost version."
140
+
"spec.licenseSecret", "The name of the Kubernetes secret containing your license (e.g., mattermost-license). Required for Enterprise deployments."
88
141
"spec.mattermostEnv", "List of custom environment variables for the Mattermost instance. Only required when tweaking Mattermost configuration is required."
89
-
90
-
Additional fields are documented `in the example <https://github.com/mattermost/mattermost-operator/blob/master/docs/examples/mattermost_full.yaml>`__. If you have previous experience with Kubernetes Custom Resources, you can also check the `Custom Resource Definition <https://github.com/mattermost/mattermost-operator/blob/master/config/crd/bases/installation.mattermost.com_mattermosts.yaml>`__.
142
+
"spec.image", "Docker image for the Mattermost app servers."
143
+
"spec.imagePullPolicy", "Image Pull policy used by Mattermost deployment."
144
+
"spec.useServiceLoadBalancer", "Set to true to use AWS or Azure load balancers instead of an NGINX controller."
145
+
"spec.serviceAnnotations", "Service annotations to use with AWS or Azure load balancers."
146
+
"spec.ingress.enabled", "Indicates if Ingress should be created by Mattermost Operator."
147
+
"spec.ingress.annotations", "Custom annotations propagated to Ingress resource."
148
+
"spec.ingress.tlsSecret", "Name of a Secret that contains TLS certificates for the ingress."
149
+
"spec.database.external.secret", "Name of a Kubernetes secret containing connection string to an external database."
"spec.elasticSearch.username", "Username to log into Elasticsearch."
155
+
"spec.elasticSearch.password", "Password to log into Elasticsearch."
156
+
"spec.scheduling.resources", "Resource requests and limits of pod and container (Kubernetes)."
157
+
"spec.scheduling.nodeSelector", "Node selector for assigning pods to nodes (Kubernetes)."
158
+
"spec.scheduling.affinity", "Affinity and anti-affinity for assigning pods to nodes (Kubernetes)."
159
+
160
+
More information on these additional fields can be found `in this example <https://github.com/mattermost/mattermost-operator/blob/master/docs/examples/mattermost_full.yaml>`__. If you have previous experience with Kubernetes Custom Resources, you can also check the `Custom Resource Definition <https://github.com/mattermost/mattermost-operator/blob/master/config/crd/bases/installation.mattermost.com_mattermosts.yaml>`__.
161
+
162
+
3. Create a file ``mattermost-database-secret.yaml`` to house secrets related to your installation's database. The database secret needs to be created in the namespace that will hold the Mattermost installation. The secret should contain the following data:
3. Create external database secret. The database secret needs to be created in the namespace that will hold the Mattermost installation. The secret should contain the following data:
93
176
94
177
.. csv-table::
95
178
:header: "Key", "Description", "Required"
@@ -98,7 +181,7 @@ Deploy Mattermost
98
181
"MM_SQLSETTINGS_DATASOURCEREPLICAS", "Connection string to read replicas of the database.", "No"
99
182
"DB_CONNECTION_CHECK_URL", "The URL used for checking that the database is accessible.", "No"
100
183
101
-
Example secret for AWS Aurora compatible with PostgreSQL:
184
+
Here's an example of a secret for AWS Aurora with PostgreSQL:
102
185
103
186
.. code-block:: yaml
104
187
:class: mm-code-block
@@ -117,15 +200,27 @@ Deploy Mattermost
117
200
118
201
For PostgreSQL databases, the connection is checked with `pg_isready <https://www.postgresql.org/docs/9.3/app-pg-isready.html>`__ so the ``DB_CONNECTION_CHECK_URL`` is the same as connection string.
119
202
120
-
4. Create external filestore secret. The filestore secret needs to be created in the namespace that will hold the Mattermost installation. The secret should contain the following data:
203
+
4. Create a file ``mattermost-filestore-secret.yaml`` to house secrets related to your installation's filestore. The filestore secret needs to be created in the namespace that will hold the Mattermost installation. The secret should contain the following data:
204
+
205
+
.. code-block:: yaml
206
+
207
+
apiVersion: v1
208
+
data:
209
+
accesskey: <accesskey>
210
+
secretkey: <secretkey>
211
+
kind: Secret
212
+
metadata:
213
+
name: <name>
214
+
type: Opaque
121
215
122
216
.. csv-table::
123
217
:header: "Key", "Description", "Required"
124
218
125
219
"accesskey", "Filestore access key.", "Yes"
126
220
"secretkey", "Filestore secret key.", "Yes"
221
+
"metadata.name": "The name of the secret.", "Yes"
127
222
128
-
Example secret for AWS S3:
223
+
Here's an example of a secret for Amazon S3:
129
224
130
225
.. code-block:: yaml
131
226
:class: mm-code-block
@@ -141,7 +236,10 @@ Deploy Mattermost
141
236
142
237
5. Adjust installation manifest.
143
238
144
-
To instruct Mattermost Operator to use the external database, modify Mattermost manifest by adding the following fields:
239
+
.. tip::
240
+
For more information on where in the YAML structure to make the below updates, reference the supported fields in step 2.
241
+
242
+
In order for the Mattermost Operator to utilize your external database, you must modify the Mattermost manifest (inside the ``mattermost-installation.yaml`` file) by adding the following fields:
145
243
146
244
.. code-block:: yaml
147
245
:class: mm-code-block
@@ -150,9 +248,9 @@ Deploy Mattermost
150
248
...
151
249
database:
152
250
external:
153
-
secret: my-postgres-connection
251
+
secret: <secret name> # The name of the secret containing the database connection string. You set this value in step 3. Example = my-postgres-connection
154
252
155
-
To instruct Mattermost Operator to use the external filestore, modify Mattermost manifest by adding the following fields:
253
+
Now, point the Mattermost Operator at your external filestore. Modify the Mattermost manifest (inside the ``mattermost-installation.yaml`` file) by adding the following fields:
156
254
157
255
.. code-block:: yaml
158
256
:class: mm-code-block
@@ -163,7 +261,7 @@ Deploy Mattermost
163
261
external:
164
262
url: s3.amazonaws.com
165
263
bucket: my-s3-bucket
166
-
secret: my-s3-iam-access-key
264
+
secret: <secret name> # The name of the secret containing the filestore access and secret keys. You set this value in step 4. Example = my-s3-iam-access-key
167
265
168
266
Additionally when using Amazon S3, set the ``MM_FILESETTINGS_AMAZONS3SSE`` and ``MM_FILESETTINGS_AMAZONS3SSL`` environment variables to ``true``:
169
267
@@ -179,7 +277,7 @@ Deploy Mattermost
179
277
- name: MM_FILESETTINGS_AMAZONS3SSL
180
278
value: "true"
181
279
182
-
Example Mattermost manifest configured with both external databases and filestore:
280
+
If you've configured your Mattermost Enterprise Edition installation manifest with a custom PostgreSQL database, and an Amazon S3 filestore, your installation manifest should look something like this:
0 commit comments