Search code examples
kubernetesminikubenginx-ingressmattermost

Failing to run Mattermost locally on a Kubernetes cluster using Minikube


Summary in one sentence

I want to deploy Mattermost locally on a Kubernetes cluster using Minikube

Steps to reproduce

I used this tutorial and the Github documentation:

  1. To start minikube: minikube start --kubernetes-version=v1.21.5
  2. To start ingress; minikube addons enable ingress
  3. I cloned the Github repo with tag v1.15.0 (second link)
  4. In the Github documentation (second link) they state that you need to install Custom Resources by running: kubectl apply -f ./config/crd/bases
  5. Afterwards I installed MinIO and MySQL operators by running: make mysql-minio-operators
  6. Started the Mattermost-operator locally by running: go run .
  7. In the end I deployed Mattermost (I followed step 2, 7 and 9 from the first link)

Observed behavior

Unfortunately I keep getting the following error in the mattermost-operator:

INFO[1419] [opr.controllers.Mattermost] Reconciling Mattermost  Request.Name=mm-demo Request.Namespace=mattermost
INFO[1419] [opr.controllers.Mattermost] Updating resource  Reconcile=fileStore Request.Name=mm-demo Request.Namespace=mattermost kind="&TypeMeta{Kind:,APIVersion:,}" name=mm-demo-minio namespace=mattermost patch="{\"status\":{\"availableReplicas\":0}}"
INFO[1419] [opr.controllers.Mattermost.health-check] mattermost pod not ready: pod mm-demo-ccbd46b9c-9nq8k is in state 'Pending'  Request.Name=mm-demo Request.Namespace=mattermost
INFO[1419] [opr.controllers.Mattermost.health-check] mattermost pod not ready: pod mm-demo-ccbd46b9c-tp567 is in state 'Pending'  Request.Name=mm-demo Request.Namespace=mattermost
ERRO[1419] [opr.controllers.Mattermost] Error checking Mattermost health  Request.Name=mm-demo Request.Namespace=mattermost error="found 0 updated replicas, but wanted 2"

By using k9s I can see that mm-demo won't start. See below for photo.

enter image description here


Another variation of deployment

Also tried another variation by following all the steps from the first link (without the licences secret step). At this point the mattermost-operator is visible using k9s and won't getting any errors. But unfortunately the mm-demo pod keeps crashing (empty logs, so seeing no errors or something). Anybody an idea?


Solution

  • As @Ashish faced the same issue, he fixed it by upgrading the resources.

    Minikube will be able to run all the pods by running minikube start --kubernetes-version=v1.21.5 --memory 4000 --cpus 4