-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvip-rc.yaml
47 lines (47 loc) · 1.21 KB
/
vip-rc.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
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-keepalived-vip
labels:
k8s-app: kube-keepalived-vip
spec:
replicas: 1
selector:
k8s-app: kube-keepalived-vip
template:
metadata:
labels:
k8s-app: kube-keepalived-vip
name: kube-keepalived-vip
spec:
hostNetwork: true
containers:
- image: k8s.gcr.io/kube-keepalived-vip:0.11
name: kube-keepalived-vip
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- mountPath: /lib/modules
name: modules
readOnly: true
# use downward API
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# to use unicast
args:
- --services-configmap=default/vip-configmap
# unicast uses the ip of the nodes instead of multicast
# this is useful if running in cloud providers (like AWS)
#- --use-unicast=true
volumes:
- hostPath:
path: /lib/modules
name: modules