Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Latest commit

 

History

History
37 lines (26 loc) · 2.08 KB

README.md

File metadata and controls

37 lines (26 loc) · 2.08 KB

oke-cockroachdb

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.

Prerequisites

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.

Deploying CockroachDB on Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE)

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.

Initialize and update Helm

helm init --upgrade --service-account tiller

Install the CockroachDB Helm chart

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

Confirm that the pods are running

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

Access the Admin UI

kubectl port-forward my-release-cockroachdb-0 8080

Then go to http://localhost:8080/ in a browser.

Using the built-in SQL client

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