Skip to content

schemen/kubernetes-hetzner-keepalived

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Hetzner Keepalived

Originally forked from yoshz/docker-hetzner-keepalived. This is now improved to run on a Kubernetes cluster.

Docker image running keepalived and Hetzner notify script to assign a floating ip to a node with automatic failover.

Kubernetes deployment

Create namespace

kubectl create namespace keepalived

Create a configmap, for example:

cat <<EOF | kubectl create -n keepalived -f -
apiVersion: v1
kind: ConfigMap
metadata:
  name: keepalived
data:
  iface: ens10 # Use an internal network where VRRP traffic can go over
  vips: 192.168.11.12/32 dev eth0  
  pass: AwesomePasswordLol
  floating_ip: 192.168.11.12
  priority: "100" # You can remove this if you want it done automatically (I prefere it set so all are equally on)
EOF

Create a secret with Hetzner API token

kubectl create secret generic hetzner -n keepalived --from-literal=token=YOUR_TOKEN

Install hetzner-keepalived

kubectl apply -f k8s/hetzner-keepalived.yaml

About

Keepalived for Hetzner

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Shell 95.1%
  • Dockerfile 4.9%