routing - External Load Balancer for Kubernetes cluster -


i want implement simple layer 7 load balancer in kubernetes cluster allow me expose kubernetes services external consumers.

i create simple ha-proxy based container observe kubernetes services , respective endpoints , reload backend/frontend configuration (complemented syn eating rule during reload)

this allow me access kubernetes services svca, svcb, svcc over

http://load-balancer-ip:port/svca -------> pod endpoints..... http://load-balancer-ip:port/svcb -------> pod endpoints.....  http://load-balancer-ip:port/svcc -------> pod endpoints..... 

how above approach work compared

(1) ha-proxy forwarding requests clusterip address of kubernetes services.

 http://load-balancer-ip:port/svca ------->clusterip-svca  http://load-balancer-ip:port/svcb ------->clusterip-svca  http://load-balancer-ip:port/svcc ------->clusterip-svca 

(2) ha-proxy load-balancing requests worker-node-ip:port obtained creating nodeport type services

http://load-balancer-ip:port/svca  --------> node1:p1, node2:p1, node3:p1 http://load-balancer-ip:port/svcb  --------> node1:p2, node2:p2, node3:p2 http://load-balancer-ip:port/svcc  --------> node1:p3, node2:p3, node3:p3 

note: k8s cluster running on custom solution (on-premise vms)

i think nginx ingresscontroller can work better in case. have set backend service , hostname inside ingress definition.

take here: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -