Skip to content

Instantly share code, notes, and snippets.

@fvoges
Created November 22, 2022 14:15
Show Gist options
  • Save fvoges/d050c780d953712af382f6a5da7f1118 to your computer and use it in GitHub Desktop.
Save fvoges/d050c780d953712af382f6a5da7f1118 to your computer and use it in GitHub Desktop.
Example HAProxy configuration for HashiCorp Vault
frontend vault_api_vip
bind *:8200
mode tcp
default_backend vault_api_pool
option tcplog
backend vault_api_pool
mode tcp
balance roundrobin
option httpchk HEAD /v1/sys/health
http-check expect status 200
server vault01 vaul01.example.com:8200 check check-ssl verify none
server vault02 vaul02.example.com:8200 check check-ssl verify none
server vault03 vaul03.example.com:8200 check check-ssl verify none
frontend vault_replication_vip
bind *:8201
mode tcp
default_backend vault_replication_pool
option tcplog
backend vault_replication_pool
mode tcp
balance roundrobin
option httpchk HEAD /v1/sys/health
http-check expect status 200
server vault01 vaul01.example.com:8201 check check-ssl verify none port 8200
server vault02 vaul02.example.com:8201 check check-ssl verify none port 8200
server vault03 vaul03.example.com:8201 check check-ssl verify none port 8200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment