Check out the post.
Install:
- Go
- CloudFlare's SSL ToolKit (
cfssl
andcfssljson
) - Consul
- Vault
- Minikube
Start the cluster:
$ minikube start --vm-driver=virtualbox
$ minikube dashboard
Create a Certificate Authority:
$ cfssl gencert -initca certs/config/ca-csr.json | cfssljson -bare certs/ca
Create the private keys and TLS certificates:
$ cfssl gencert \
-ca=certs/ca.pem \
-ca-key=certs/ca-key.pem \
-config=certs/config/ca-config.json \
-profile=default \
certs/config/consul-csr.json | cfssljson -bare certs/consul
$ cfssl gencert \
-ca=certs/ca.pem \
-ca-key=certs/ca-key.pem \
-config=certs/config/ca-config.json \
-profile=default \
certs/config/vault-csr.json | cfssljson -bare certs/vault
Spin up Vault and Consul on Kubernetes:
$ sh create.sh
In a new terminal window, navigate to the project directory and set the following environment variables:
$ export VAULT_ADDR=https://127.0.0.1:8200
$ export VAULT_CACERT="certs/ca.pem"
$ kubectl get pods
$ vault status