大网数据广告活动
服务器运维问答

How to choose a valid VIP for kube-vip HA Cluster setup?

· 52CE 我爱测

I am following this reference https://kube-vip.io/control-plane/ for HA cluster setup. I want to setup 3 master - 1 worker cluster for testing purpose. The documentation uses 192.168.0.75 as VIP, but not mentioning how they got t…

问题原文

原帖链接 · Keval Bhogayata · CC BY-SA 4.0

I am following this reference https://kube-vip.io/control-plane/ for HA cluster setup. I want to setup 3 master - 1 worker cluster for testing purpose.

The documentation uses 192.168.0.75 as VIP, but not mentioning how they got this IP

As I am using digitalocean droplets for Kubernetes, I tried using IP from VPC IP range, say it is 10.x.y.z for kubeadm init which is same for all the droplets. But, I am not able to do kubeadm join with this IP (says. http://10.x.y.z:6443 no route to host)

How do I get a valid VIP value ?

已采纳解答

原帖链接 · Eleasar · CC BY-SA 4.0

kube-vip itself does not really care what IP address you use, as long as it is 'free' and in the same subnet your chosen interface is in.

Suppose eth0 on the master nodes looks like this:

// master node 1
eth0 inet addr:192.168.1.11
     bcast:192.168.1.255
     mask:255.255.255.0

// master node 2
eth0 inet addr:192.168.1.12
     bcast:192.168.1.255
     mask:255.255.255.0

// master node 3
eth0 inet addr:192.168.1.13
     bcast:192.168.1.255
     mask:255.255.255.0

You can now use 192.168.1.X as the VIP. 192.168.1.67 would work, and so would 192.168.1.182 or 192.168.1.10 (assuming the addresses are 'free'). None of these IP addresses is 'more valid' than the others.

I am not sure how all of this works on digitalocean (since I have never used it), but you will probably have to assign an additional IP address that all nodes can use. On linode (similar platform) for example, there is an option called 'IP sharing', which allows you to share one IP between multiple nodes.

But all that aside, you probably do not even need kube-vip, as digitalocean offers managed TCP load balancers which is probably what you are looking for. I have even found a tutorial on how to set up an HA control plane with digitalocean's managed load balancer.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-02-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。