Simple 3 node secure CockroachDB cluster with NGINX acting as load balancer
roach-0
- CockroachDB noderoach-1
- CockroachDB noderoach-2
- CockroachDB nodelb
- NGINX acting as load balancerroach-cert
- Holds certificates as volume mountsroach-init
- Executes some commands against CockroachDB and shuts down. See here.
If you are using Google Chrome as your browser, you may want to navigate here
chrome://flags/#allow-insecure-localhost
and set this flag toEnabled
.
- execute
./up.sh
to start the cluster - visit the CockroachDB UI @ https://localhost:8080 and login with username
test
and passwordpassword
- have fun!
docker compose exec roach-0 /bin/bash
docker compose exec roach-1 /bin/bash
docker compose exec roach-2 /bin/bash
docker compose exec lb /bin/sh
docker compose exec roach-cert /bin/sh
Use these commands to copy client.root.*
files from the roach-cert
docker image to your local machine
docker cp roach-cert:/certs/client/client.root.crt .
docker cp roach-cert:/certs/client/client.root.key .
docker cp roach-cert:/certs/client/client.root.key.pk8 .