Kubernetes Views 3

Building a Kubernetes HA cluster, part 1

Building a Kubernetes HA cluster, part 1 image 1

Building an HA cluster


Before you start..

Start from a state where containerd and Kubernetes are already installed on the master and worker nodes


Architecture

Building a Kubernetes HA cluster, part 1 image 2

Setting up HAProxy

  • Kubernetes cluster network range : 10.10.10.0/24
  • Master node IP : 10.10.10.1~3
  • Worker node IP : 10.10.10.11~13
  • HA-Proxy (Load-Balancer) IP : 10.10.10.254

Let’s set up HAProxy in an environment like the one above

  • Install the haproxy package

  • apt-get install -y haproxy
  • Set the config file

  • cat >> /etc/haproxy/haproxy.cfg 
    
    frontend kubernetes-master-lb 
         bind 10.10.10.254:16443 # enter the load balancer IP 
         option tcplog 
         mode tcp default_backend kubernetes-master-nodes 
    
    backend kubernetes-master-nodes
         mode tcp 
         balance roundrobin 
         option tcp-check 
         option tcplog 
         server node1 10.10.10.1:6443 check #check masternode 
         server node2 10.10.10.2:6443 check 
         server node3 10.10.10.3:6443 check

After setting that config file, restart the haproxy service.

Part 2

https://librat.kr/entry/Kubernetes-HA-Cluster-고가용성-클러스터-구축-2

Part 3

https://librat.kr/entry/Kubernetes-HA-Cluster-고가용성-클러스터-구축-3

Reactions

Comments 0

A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.

Comments appear after a review. The password is used again to edit or delete.