Helm deployment with MySQL as storage

Hello,

I’m trying to deploy Vault with Helm using MySQL as storage and I’m getting this error:

service_registration is configured, but storage does not support HA

Vault’s documentation says that MySQL supports HA so I guess that I’m doing something wrong.

I’m following the steps on here:

  • I’ve created a config file for the storage:
storage "mysql" {
address = "mysqladdresss"
username = "username"
password = "password"
database = "db"
}
  • Create a secret with this file:
kubectl -n vault create secret generic vault-storage-config --from-file=config.hcl
  • Install the chart with HA enabled and the secret mounted as a volume:
helm -n vault install vault hashicorp/vault \                                                                        
  --set='server.extraVolumes[0].type=secret' \
  --set='server.extraVolumes[0].name=vault-storage-config' \
  --set='server.extraArgs=-config=/vault/userconfig/vault-storage-config/config.hcl' --set "server.ha.enabled=true"

What am I missing?

Thank you.

@fgsalomon, I have ha working with mysql, I’ve configured it in the storage section:

storage "mysql" {
username = "user"
password = "pass"
database = "vault"
ha_enabled = "true"
}
2 Likes

@jonthegimp thank you! That did it.
Somehow I missed that part of the documentation :sweat_smile: