How to setup internal Load Balancer for kubernetes HA cluster setup?

521 views
Skip to first unread message

sureshel...@gmail.com

unread,
Oct 25, 2017, 7:31:19 AM10/25/17
to Kubernetes user discussion and Q&A
I am trying to setup a High Availability kubernetes cluster ( 2 masters and 1 node) in bare metal environment, I need to setup a LB exactly look like below

_____ Master1 Port 8080
|
Load Balancer Port 8080 -- ---- Master2 Port 8080
|
----- Master3 Port 8080

_____ Master1 Port 2379
|
Load Balancer Port 2379 -- ---- Master2 Port 2379
|
----- Master3 Port 2379

can anyone suggest a best way to go?

Matthias Rampke

unread,
Oct 25, 2017, 7:55:37 AM10/25/17
to kubernet...@googlegroups.com
Don't use a loadbalancer for etcd, just tell each kube-apiserver about all 3. Use DNS names if you don't want to update all apiservers whenever you swap out an etcd, but that's optional.

For the apiserver itself, the simplest way would be to just put all 3 behind a single DNS name. Otherwise, use any loadbalancer that is available to you, it doesn't really matter, as long as it accepts long-lived connections. I think session affinity is not required, but if you get lots of messages about issues watching from specific versions try that.

If you have only one node, what is the benefit of a high availability master? The cluster will keep happily running if a single master is temporarily unavailable, but whenever the single node goes away the applications will be effectively down.

/MR

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

sureshel...@gmail.com

unread,
Oct 25, 2017, 8:46:02 AM10/25/17
to Kubernetes user discussion and Q&A
On Wednesday, October 25, 2017 at 5:25:37 PM UTC+5:30, Matthias Rampke wrote:
> Don't use a loadbalancer for etcd, just tell each kube-apiserver about all 3. Use DNS names if you don't want to update all apiservers whenever you swap out an etcd, but that's optional.
>
>
> For the apiserver itself, the simplest way would be to just put all 3 behind a single DNS name. Otherwise, use any loadbalancer that is available to you, it doesn't really matter, as long as it accepts long-lived connections. I think session affinity is not required, but if you get lots of messages about issues watching from specific versions try that.
>
>
> If you have only one node, what is the benefit of a high availability master? The cluster will keep happily running if a single master is temporarily unavailable, but whenever the single node goes away the applications will be effectively down.
>
>
> /MR
>
>
Just for testing, I m using 1 node cluster can you elaborate setting up the load balancer, I very new to kuberentes

Matthias Rampke

unread,
Oct 25, 2017, 11:03:43 AM10/25/17
to kubernet...@googlegroups.com
There is no direct support in Kubernetes itself for this, since it's part of getting Kubernetes itself up and running. If you really want it, you need to do it yourself.

What are you trying to test? For taking Kubernetes for a spin, this is overkill. If this is about testing the load balancing setup, I can't really help you because I know nothing about the setup you are trying to test.

/MR

sureshel...@gmail.com

unread,
Oct 26, 2017, 1:13:49 AM10/26/17
to Kubernetes user discussion and Q&A
Actually, in the production there will be many nodes, but now, I am just trying to archive a HA before moving to production..!

Thanks for you help..!

Reply all
Reply to author
Forward
0 new messages