Skip to main content

Posts

Showing posts from October 7, 2019

Controllers in K8s

CONTROLLERS Controllers are the brain behind the k8s. They are the processes that monitor the k8s objects and respond accordingly. Replication Controller: The replication controller helps us to run multiple instances of a single pod in a k8s cluster, thus providing High Availability. They can also replace a Single failed pod, thus provide HA even without multiple instance of PODs. It also helps in Load Balancing and Scaling. Another reason we need replicaiton controller is to create mulltiple pods and to share the load between them. At first it will increase the number of pods in the same node when demand increases, say when the user is increasing. After the node has reached its bottleneck , we will create additional pods in another new nodes. Thus the replication controller spans across multiple nodes in the cluster. Replication Controller Vs Replica Set: They both have the same purpose, but they are not the same. Replic

Mysql Master Master Replication & LoadBalancing using HaProxy

Requirements ############## Two server running Ubuntu 16.04. Static IP address 10.0.1.12 (dn1) configured on first master server. Static IP address 10.0.1.14 (dn2) configured on second master server. A non-root user with sudo privileges configure on both server. First, you will need to install mysql server and client on dn1 server. You can install it with the following command: # sudo apt-get install mysql-server mysql-client Next, you will need to make some changes in my.cnf file of First server as below: ---------------------------------------------------------------------------------- vi /etc/mysql/mysql.conf.d/mysqld.cnf server-id = 1 log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size   = 100M # service mysql restart Next, you will need to make some changes in my.cnf file of dn2 server as below: ---------------------------------------------------------------------------------- vi /etc/mysql/mysql.conf.d/mysqld.cnf server