-
Notifications
You must be signed in to change notification settings - Fork 0
/
keepalived-install.yaml
64 lines (64 loc) · 1.52 KB
/
keepalived-install.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
kind: Namespace
apiVersion: v1
metadata:
name: high-availability
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: keepalived
namespace: high-availability
labels:
k8s-app: keepalived
spec:
selector:
matchLabels:
name: keepalived
template:
metadata:
labels:
name: keepalived
spec:
tolerations:
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/controlplane
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/etcd
operator: Exists
hostNetwork: true
containers:
- name: keepalived
image: docker.io/oats87/rancher-server-keepalived:latest
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: RANCHER_HOSTNAME
value: "demo1.rancher.space"
- name: IFACE
value: "eth0"
- name: VIP
value: "192.168.1.5"
- name: VRRP_PASS
value: "mypasswd"
- name: VR_ID
value: "54"
- name: PEERS
value: "192.168.1.2;192.168.1.3;192.168.1.4" # Set to the 3 rancher server master IPs
terminationGracePeriodSeconds: 30
volumes:
- hostPath:
path: /lib/modules
type: ""
name: lib-modules