Last active
October 16, 2020 19:13
-
-
Save janeczku/1c754dd932561a70b4ea2bdd27bc401e to your computer and use it in GitHub Desktop.
Easy peasy Failover/VIP solution for bare-metal k3s HA clusters - More info: https://github.com/janeczku/keepalived-ingress-vip
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
# Simply drop this file in `/var/lib/rancher/k3s/server/manifests/` on a k3s node | |
# Requires multicast capable network (won't work in cloud) | |
apiVersion: helm.cattle.io/v1 | |
kind: HelmChart | |
metadata: | |
name: keepalived-vip | |
namespace: kube-system | |
spec: | |
chart: keepalived-ingress-vip | |
version: v0.1.6 | |
repo: https://janeczku.github.io/helm-charts/ | |
targetNamespace: kube-system | |
valuesContent: |- | |
keepalived: | |
vrrpInterfaceName: eth0 | |
vipInterfaceName: eth0 | |
vipAddressCidr: "10.173.20.10/24" | |
checkServiceUrl: https://127.0.0.1:6443/healthz | |
checkKubelet: false | |
checkKubeApi: false | |
kind: Daemonset | |
pod: | |
nodeSelector: | |
node-role.kubernetes.io/master: "true" |
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
``` | |
Client | |
+ | |
| | |
| | |
v | |
+-----+------+ | |
+------------Virtual IP-----------+ | |
| 10.173.20.10 | | |
| | | |
| | | |
| | |
+-----------------+ +---------v-------+ | |
|eth0 10.173.20.2 | |eth0 10.173.20.3 | | |
| | | | | |
| +-----------+ | VRRP | +------------+ | | |
| | Kube API | | <----------> | | Kube API | | | |
| | | | | | | | | |
| +-----------+ | | +------------+ | | |
| K3s Master Node | | K3s Master Node | | |
+-----------------+ +-----------------+ | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment