Microk8s and Wagtail Bakery

Playing around with Kubernetes? Just found the easy way to test it using Microk8s.io MicroK8s make you focus on building and testing your application to run on K8s. It’s best tool to test microservices locally.

To start running a Wagtail CMS a Python CMS, we selected the bakery demo.

Here we have documented how to run the demo using Microk8s.
Assuming you have run microk8s on you local machine, start creating the Docker image. Another great tool to convert docker-compose file to kubernetes is to use the kompose.io.

$ docker build . -t bakery_app2:local
$ docker save bakery_app2 > bakeryapp.tar

$ microk8s.ctr  -n k8s.io image import bakeryapp.tar
$ microk8s.ctr -n k8s.io images list | grep bakery

See the deployment/app-deployment.yaml it is using the local image bakerydemo_app:latest Then start deploying the yaml files using microk8s.kubectl apply -f command.

Sample *.yaml files are inside directory deployment or generate it using the command below:

$ cd deployment
$ kompose convert -f ../docker-compose.yml 

Here is Wagtails Demo running inside microk8s screenshots.

Making it easier to migrate to use K8 can be on Google or AWS.

Leave a Reply

Your email address will not be published. Required fields are marked *