This is a walkthrough of setting CockroachDB up on Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE). It is developed jointly by Oracle and Cockroach Labs.
First you're going to need to setup an Oracle Cloud account, your environmental variables, an OKE cluster and your kubectl. It sounds like a lot, but there's a nice walkthrough here that should help.
NOTE If you plan to use CockroachDB in production, you should deploy a secure cluster by following the instructions here.
We will use Helm to deploy CockroachDB. Helm is a package manager for Kubernetes. If you don't have Helm installed, follow the instructions here to install it first.
helm init --upgrade --service-account tiller
In this example we are using "my-release" as the release name. If you use a different name, be sure to change the release name in subsequent commands.
helm install --name my-release stable/cockroachdb
kubectl get pods
NAME READY STATUS RESTARTS AGE
my-release-cockroachdb-0 1/1 Running 0 48s
my-release-cockroachdb-1 1/1 Running 0 47s
my-release-cockroachdb-2 1/1 Running 0 47s
kubectl port-forward my-release-cockroachdb-0 8080
Then go to http://localhost:8080/ in a browser.
The following command will launch an interactive pod that runs the SQL client inside it:
kubectl run cockroachdb -it --image=cockroachdb/cockroach --rm --restart=Never -- sql --insecure --host=my-release-cockroachdb-public