Metabase Community Edition + Google Kubernetes Engine (GKE)

Surprised myself by managing to get this running without too much difficulty at all (it's been an up and down week on the tech front).

Some very rough notes for those thinking about this deployment strategy:

1 - Create a cluster in GKE of course. Google are currently recommending this, seemingly for good reason!

2 - Personal suggestion - keep the workload in a namespace called metabase (I got lazy the second time round!). Next, click 'deploy' to provision some things to run on the infra:

3: Add the Docker images

Unsolicited observation: Google Cloud makes working with Docker images weirdly complicated in some services and ... perfectly easy in other places. Thankfully adding containers from Docker Hub images couldn't be easier in GKE.

You just need to create 2 x containers with the paths:

metabase/metabase:latest
postgres

Then you pop the Docker environment variables (Metabase have a good resource for these) into the slots:

And that's it. The cluster is up and running!

As there are only 2 containers it's quite easy to diagnose any issues:

image

If you click on the Metabase app pod you can see that GKE has put the variables into a secrets file. Worth checking that they're set up right before the first run!

Finally we have to set up an ingress rule. I clicked on a button to do this.

And we need to configure a port forwarding rule from the load balancer on port 80 TCP to port 3000 TCP so that it will map onto the app.

This I had to do in the file:

(Sorry, had to remove an image to keep under the new user limit!)

And that was enough to get the stack running