Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

BastienM/mattermost-kube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mattermost-kube


How to deploy

Either clone this repo or use the raw url for each manifest file (eg. https://raw.githubusercontent.com/BastienM/mattermost-kube/master/manifests/<file>).

Database

The current database setup is pretty straight forward.

Either you use an already existing one, in this case you can skip this setup. Or you can use the db-*.yaml included in this repo (in mattermost-kube/manifests/).

In the latter, edit the file db-configmap.yaml to adjust to your needs then simply use kubectl to deploy it :

$ kubectl create -f manifests/adb-configmap.yaml
$ kubectl create -f manifests/db-deployment.yaml

You can then check if everything went fine :

$ kubectl get po
NAME                              READY     STATUS    RESTARTS   AGE
mattermost-db-69cc7f8f76-2lmv6    1/1       Running   1          10s

If for some reasons the pod is stuck, you can get the detail with the following command :

$ kubectl describe po mattermost-db-<pod-id>

Mattermost

⚠️ Using the configMap to pass a custom config.json file to the container makes the usage of environment variables useless and will mess with the database settings.
As such, I provide the said configMag but will not garantee its content

Standard deployment

Nothing fancy here.

$ kubectl create -f manifests/app-deployment.yaml

Custom configuration

If you will to be able to customize your mattermost instance beforehand, check and edit app-configmap.yaml accordingly.
And uncomment the matching parts in app-deployment.yaml.

$ kubectl create -f manifests/app-configmap.yaml
$ kubectl create -f manifests/app-deployment.yaml

Using namespaces

You can leverage Kubernetes namespace in order to have multiple instances of Mattermost at the same time.

Two examples can be found in the folder mattermost-kube/namespaces and be deploy as any standard Kubernetes objects :

$ kubectl create -f namespaces/dev.json
$ kubectl create -f namespaces/prod.json

Alternatively you can use the flag --namespace at the end of kubectl create commands to dynamically create namespaces and deploy the objects directly to it at the same time.

Tasks list (@todo)

  • Implement HPA (Horizontal Pod Autoscaler) for Mattermost
  • Deploy Postgres as a cluster (HA mode) with Stolon
  • Set up a cron'ed backup task for the Database using Kubernetes cronJob and psql

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published