This file contains hidden or 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
vrrp_instance VI_1 { | |
state BACKUP | |
interface eth0 # Change to your network interface name | |
virtual_router_id 51 | |
priority 100 # Lower priority for backups | |
advert_int 1 | |
unicast_src_ip 10.10.10.13 # piserver-b3 | |
unicast_peer { | |
10.10.10.10 # piserver-p1 | |
10.10.10.11 # piserver-b1 |
This file contains hidden or 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
vrrp_instance VI_1 { | |
state BACKUP | |
interface eth0 # Change to your network interface name | |
virtual_router_id 51 | |
priority 150 # Lower priority for backups | |
advert_int 1 | |
unicast_src_ip 10.10.10.12 # piserver-b2 | |
unicast_peer { | |
10.10.10.10 # piserver-p1 | |
10.10.10.11 # piserver-b1 |
This file contains hidden or 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
vrrp_instance VI_1 { | |
state BACKUP | |
interface eth0 # Change to your network interface name | |
virtual_router_id 51 | |
priority 200 # Lower priority for backups | |
advert_int 1 | |
unicast_src_ip 10.10.10.11 # piserver-b1 | |
unicast_peer { | |
10.10.10.10 # piserver-p1 | |
10.10.10.12 # piserver-b2 |
This file contains hidden or 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
vrrp_instance VI_1 { | |
state MASTER | |
interface eth0 # Change to your network interface name via `ip a` | |
virtual_router_id 51 | |
priority 250 # Higher priority for the master, 255 max value | |
advert_int 1 | |
unicast_src_ip 10.10.10.10 # piserver-p1 | |
unicast_peer { | |
10.10.10.11 # piserver-b1 | |
10.10.10.12 # piserver-b2 |
This file contains hidden or 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
sudo dnsdist -c | |
> showServers() | |
# Name Address State Qps Qlim Ord Wt Queries Drops Drate Lat Outstanding Pools | |
0 pihole-cluster 10.10.10.254:53 up 0.9 0 1 1 77818 109 0.0 13.0 0 | |
1 pihole1 10.10.10.5:53 up 0.9 0 1 1 77867 0 0.0 16.9 0 | |
2 pihole2 10.10.10.6:53 up 0.8 0 1 1 77798 94 0.0 18.3 0 | |
All 0.0 233483 203 |
This file contains hidden or 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
-- Define your Pi-hole DNS servers | |
newServer({address="10.10.10.254", name="pihole-cluster", checkName="cloudflare.com", checkInterval=30}) | |
newServer({address="10.10.10.5", name="pihole1", checkName="cloudflare.com", checkInterval=30}) | |
newServer({address="10.10.10.6", name="pihole2", checkName="cloudflare.com", checkInterval=30}) | |
-- Set the load balancing policy | |
setServerPolicy(roundrobin) | |
-- Listen on port 53 (DNS) | |
addLocal("0.0.0.0:53") |
This file contains hidden or 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
# for control-plan nodes, ensure ip_vs modules are loaded | |
sudo nano /etc/modules-load.d/modules.conf | |
# add the following | |
ip_vs | |
ip_vs_rr | |
ip_vs_wrr | |
ip_vs_sh | |
nf_conntrack_ipv4 |
This file contains hidden or 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
helm install my-kube-vip kube-vip/kube-vip -n kube-system -f kube_vip_values.yaml |
This file contains hidden or 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
image: | |
repository: ghcr.io/kube-vip/kube-vip | |
pullPolicy: Always | |
# Overrides the image tag whose default is the chart appVersion. | |
tag: v0.6.4 | |
config: | |
address: "192.168.1.100" | |
env: |
This file contains hidden or 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
helm repo add kube-vip https://kube-vip.github.io/helm-charts | |
helm repo update |