Initialize Vault secrets backend
Tarook exclusively supports HashiCorp Vault as backend for storing secrets. For details on the use of Vault in Tarook, please see the Use of HashiCorp Vault in Tarook section.
At the time of writing there is no documentation on how to create a production-ready Vault backend yet but for testing purposes you may use the development setup [1] which automatically sets up a Vault instance in a local container.
Note
We assume you have setup a container runtime like e.g. docker or podman!
Ensure that sourcing (comment it in)
vault_env.shis part of your cluster.envrc.$ sed -i '/#source \"\$(pwd)\/managed-k8s\/actions\/vault_env.sh\"/s/^#//g' .envrc
Enable the development environment:
$ sed -i '/#[[:blank:]]*export YAOOK_K8S_DEVSHELL=/s/^#//g' ~/.config/yaook-k8s/env
Ensure that setting
USE_VAULT_IN_DOCKERtotrueis part of your cluster.envrc. This will activate the Vault development setup.$ sed -i '/export USE_VAULT_IN_DOCKER=false/s/false/true/g' .envrc $ sed -i '/#export USE_VAULT_IN_DOCKER=/s/^#//g' .envrc
Hint
If you are using rootless docker or podman, additionally set
VAULT_IN_DOCKER_USE_ROOTLESS=truein~/.config/yaook-k8s/envDon’t forget to allow your changes:
$ direnv allow .envrc
Start the docker container:
$ ./managed-k8s/actions/vault.shWarning
This is not suited for productive deployments or production use, for many reasons!