add nodeAffinity and make k3s pihole master
This commit is contained in:
@@ -6,10 +6,10 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
keepalived.conf: |
|
keepalived.conf: |
|
||||||
vrrp_instance PIHOLE_VIP {
|
vrrp_instance PIHOLE_VIP {
|
||||||
state BACKUP
|
state MASTER
|
||||||
interface eth0
|
interface eth0
|
||||||
virtual_router_id 212
|
virtual_router_id 212
|
||||||
priority 100
|
priority 50
|
||||||
advert_int 1
|
advert_int 1
|
||||||
|
|
||||||
virtual_ipaddress {
|
virtual_ipaddress {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
name: pihole-backup
|
name: pihole
|
||||||
namespace: tools
|
namespace: tools
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@@ -14,7 +14,18 @@ spec:
|
|||||||
app: pihole
|
app: pihole
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- kube-02
|
||||||
|
- kube-03
|
||||||
|
- kube-04
|
||||||
|
- kube-05
|
||||||
|
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-keepalived
|
- name: init-keepalived
|
||||||
|
|||||||
Reference in New Issue
Block a user