Posts

Showing posts from 2022

Auto Scale DNS using kubernetes and CI/CD deployment using gitlab

Image
Imagine that your application can automatically add another container to serve more request and delete unused container when requests are declining, with this approach, you can preserve the resources for another application and also decrease the bill for cloud resource usage. With kubernetes, you can achieve this using HPA (Horizontal pod autoscaler) or using vertical autoscaler. But in this tutorial, we will only show how to use HPA. The case for this tutorial is to autoscale DNS to serve approximately thousand users. We need external Load Balancer to forward requests to kubernetes.

Galera behind NAT (mixed environment in k8s and docker)

Image
Database plays an important role in the application development. To have a redundant and high available database, we can use Galera for mysql/mariadb. With Galera, the database can have replication across different server and the load can be divided into some servers. By that capability, we can have a reliable backend database for our application. In this tutorial, we will deploy galera cluster inside kubernetes and docker. In normal circumstance, when we install galera inside kubernetes, the replication communication is using internal network. So we need to set galera to use external network so that galera cluster can communicate with mariadb outside the kubernetes. With this setup, we can combine galera node located in kubernetes, docker, private or public cloud.