Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talalUcef/5a800d2dc4427eb4df1a89c57a315c66 to your computer and use it in GitHub Desktop.
Save talalUcef/5a800d2dc4427eb4df1a89c57a315c66 to your computer and use it in GitHub Desktop.
Install HashiCorp Vault on Kubernetes locally with PostgreSQL as the back-end storage

Install Hashicorp Vault official helm chart on minikube/Docker Desktop Kubernetes with PostgreSQL as a backend

Hashicorp Vault is a well-known secrets management solution that supports many technologies like Kubernetes and databases. Vault also supports many storage backends like Consul and PostgreSQL.

In this post, we will install Vault on a local Kubernetes cluster with a PostgreSQL backend storage, so to do that, we will first install PostgreSQL and pgAdmin and show how to install and configure Vault locally at the end.

Install PostgreSQL

If you don't have a running Postgres instance, install Postgres chart :

https://gist.github.com/b9a7385bcfdcb222edafcc13fcb20f65

Install pgAdmin

https://gist.github.com/bc1b84cbc4b5aa571ff55e428d2b2631

Create vaultdb database and vault's schema

The default credentials for pgAdmin's chart are:
email: chart@example.local
password: SuperSecret

Once logged to pgAdmin, create vaultdb database and the following schema :

https://gist.github.com/d40a36bd0b6c1d50ad5417f05e6db0d8

Install vault

To install Vault, we have to customize the default values as in the file values.yaml. So create a values.yaml file and copy/paste the following content inside it :

https://gist.github.com/0ac89e1096fb0e6291cbf7a7a3bb351b

Once you've done that, walk through the following steps :

https://gist.github.com/32c76f1ffb65f5c1bd135c2dc9b3fe48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment