-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Kube-vip | ||
= | ||
|
||
### 配置集群高可用 | ||
#### 1.创建Kube-vip的静态pod | ||
kube-vip的pod需要先于k8s集群创建,因此我们采用static pod方式来创建kube-vip的pod。 | ||
在三台master服务器上执行以下命令(VIP和网卡名根据实际情况修改) | ||
```bash | ||
export VIP=192.168.88.200 | ||
export INTERFACE=enp0s18 | ||
|
||
KVVERSION=$(curl -sL https://api.github.com/repos/kube-vip/kube-vip/releases | jq -r ".[0].name") | ||
|
||
alias kube-vip="ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:$KVVERSION vip /kube-vip" | ||
|
||
kube-vip manifest pod \ | ||
--interface $INTERFACE \ | ||
--address $VIP \ | ||
--controlplane \ | ||
--services \ | ||
--arp \ | ||
--leaderElection | tee /etc/kubernetes/manifests/kube-vip.yaml | ||
``` |