Posts

Showing posts from May, 2020

Kubernetes Nginx-ingress controller with HAProxy on Bare Metal

Kubernetes works like a wonder in cloud environments like AWS, Azure, or GCE. Many times we do not have a luxury of the above cloud environments. This article helps you to set up an ingress-controller with Nginx as a load balancer in a bare-metal machine. Pre-requisites 3 virtual machines Git installed Centos 7 or any Linux distro Setting up HA Proxy Centos 7 HAProxy is free, open-source software that provides a high availability load balancer and proxy server for TCP and HTTP-based applications that spreads requests across multiple servers Create a virtual machine named HAProxy.  Install haproxy using the yum package   yum install haproxy -y Edit the ha config file and add the following like this vi /etc/haproxy/haproxy.cfg Delete all the section below the defaults section and add the following at last frontend http_front bind *:80 bind :8080 stats uri /haproxy?stats default_backend http_back backend http_back balance round-robin server kube 10.10.10.10:80 s