Mattermost Operator
Mattermost Operator
by Mattermost

Version 0.7.0



Mattermost is the open source messaging platform for DevOps teams. Discuss topics in channels, private groups or one-to-one with rich Markdown formatting, and easily share code snippets with syntax highlighting for more than 50 programming languages. 

This 1-Click App offers a Kubernetes Operator for Mattermost to simplify deploying and managing your Mattermost instance at production-ready scale. With this 1-Click App listing, you can deploy in moments and self-host team chat on your private cloud and connect in-house systems with plugins, Slack-compatible integrations, and extensive API support.

Mattermost is a scalable, open source collaboration tool. It's written in Golang and React. Learn more about Mattermost at The Mattermost server source code is available at

Software Included

Getting started after deploying Mattermost Operator

After you have downloaded your kubeconfig file, and are able to successfully connect to your DigitalOcean Kubernetes cluster (see if you haven’t connected to your cluster) follow the instructions below to start Mattermost.

NOTE: In order to operate properly, your Mattermost cluster requires at least 3 nodes each with 8GB of RAM and 4vCPUs

Create your Mattermost Enterprise license secret

If you don't have a Mattermost Enterprise license you can register for a trial license at Create a file named mattermost-license-secret.yaml with the following content:

apiVersion: v1
kind: Secret
  name: mattermost-license
type: Opqaue

replacing %LICENSE_FILE_CONTENTS% with the content of your Mattermost license.

Apply it to your Mattermost cluster with:

kubectl apply -f mattermost-license-secret.yaml

Create your Mattermost Installation manifest and apply it to the cluster

You can create a trial Mattermost cluster for 100 users quickly and easily by using the following settings, or alternatively if you have customized settings for your production deploy you can use those. This trial cluster will use nginx-ingress to establish the LoadBalancer and as a result, you'll require your own domain name and host name for this deployment.

Create a file named mattermost-installation.yaml with the following content, ensuring to put your own domain in place of the parts:

kind: ClusterInstallation
  name: mm-yourdomain-full
  size: 500users
  image: mattermost/mattermost-enterprise-edition
  ingressAnnotations: nginx
  version: 5.15.0
  mattermostLicenseSecret: "mattermost-license"
    storageSize: 50Gi
    storageSize: 50Gi
    host: ""
    username: ""
    password: ""

You can read about customizations to your manifest at

Apply it to your Mattermost cluster with:

kubectl create ns mattermost

followed by

kubectl apply -n mattermost -f mattermost-installation.yaml

Wait five minutes for the installation to complete, and then grab your LoadBalancer External IP with the following:

kubectl get svc ingress-nginx -n ingress-nginx

Connect to Mattermost and get going

You'll see output similar to the following, and can add the LoadBalancer EXTERNAL-IP in your domain DNS as the hostname you specified in your installation manifest (above), in order to get started with Mattermost:

NAME            TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)               AGE
ingress-nginx   LoadBalancer    80:31205/TCP,443:31407/TCP   38m

You can read more at, including resource scaling guidelines for the number of users your installation will support.

For more information about how to use please follow:

API Creation

In addition to creating Mattermost Operator via the control panel, you can also use the DigitalOcean API.

As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

  curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer '$TOKEN'" -d \
      '{"name": "choose-a-name","region": "sfo2","version": "1.17.5-do.0","node_pools": [{"size": "s-1vcpu-2gb","count": 3,"name": "choose-a-name"}]}' \

Support Details

Supported By:Mattermost
Support URL: