Kubernetes is awesome. This is what makes containers shine. Sure you have loads of yaml files but this also makes it real easy to rebuild, try out and restart. Which is great for the phase the project is in right now.
So how far is the infra:
- Kubernetes with weave.net as overlay network (This adds the benefit of encryption between the nodes)
- The MySQL Group replication with automatic scaling. Easy to scale up/down and the container automatically joins the replication group via a startup script.
- Redis in a master-slave configuration. I was not aware I needed redis sentinel, but I did 🙂
- Amazon S3 as a storage for objects.
- The app is running after some DNS issues. Ubuntu 17.10 which is the OS on the nodes uses netplan with systemd. Now netplan hijacks the /etc/resolv.conf file which confuses the Kubernetes DNS, but we have a solution:
to the KUBELET_DNS_ARGS like this:
Environment=”KUBELET_DNS_ARGS=–cluster-dns=10.96.0.10 –cluster-domain=cluster.local –resolv-conf=/run/systemd/resolve/resolv.conf”
Restart and now DNS is working inside the pods.
Currently working on getting the application running in the final configuration. For now I am using a workflow from test -> accept -> production. Where test is just to develop, fix and run and Accept is the final configuration on Kubernetes before production. Might switch to OTAP but since my develop and test is in my own hands I currently do not need it.