I'm currently running through the secure deployment guide for CockroachDB on Kubernetes and while it works exactly as expected, but I'm searching for ways to streamline/automate the deployment. I'm using Configs
to deploy, and I would honestly just like to be able to automate the final step (after kubectl create -f cockroachdb-statefulset.yaml
). I've been searching around for guides on streamlining deployments, but I haven't come up with much. Is there a way to complete the following after the config application:
kubectl exec -it cockroachdb-0 \
-- /cockroach/cockroach init \
--certs-dir=/cockroach/cockroach-certs
Perhaps as part of an initContainer
in the cockroachdb-statefulset.yaml
config?
I'm also looking for a way to automate the creation of a db/user account, so any insight there would be greatly appreciated.
Thanks!