CockroachDB can be deployed and managed on Kubernetes using the following methods:
Manual StatefulSet configuration
Helm package manager for Kubernetes
CockroachDB on Kubernetes
This guide describes how to handle the following tasks when running CockroachDB on Kubernetes:
- Deploying CockroachDB on a single Kubernetes cluster
- Scheduling CockroachDB pods onto worker nodes
- Managing CockroachDB resources on Kubernetes
- Managing certificates on Kubernetes
- Scaling CockroachDB on Kubernetes
- Monitoring CockroachDB on Kubernetes using Prometheus and Alertmanager
- Upgrading CockroachDB on Kubernetes
- Optimizing CockroachDB performance on Kubernetes
- Deploying CockroachDB on Red Hat OpenShift
- Orchestrating CockroachDB across multiple Kubernetes clusters
Before starting, review some basic Kubernetes terminology. Note that CockroachDB nodes are distinct from Kubernetes "nodes" or "worker nodes".
|node||A physical or virtual machine. In the deployment tutorial, you'll create GCE or AWS instances and join them as worker nodes into a single Kubernetes cluster from your local workstation.|
|pod||A pod is a group of one of more Docker containers. In the deployment tutorial, each pod will run on a separate Kubernetes worker node and include one Docker container running a single CockroachDB node, reflecting our topology recommendations.|
|StatefulSet||A StatefulSet is a group of pods treated as stateful units, where each pod has distinguishable network identity and always binds back to the same persistent storage on restart. StatefulSets are considered stable as of Kubernetes version 1.9 after reaching beta in version 1.5.|
|persistent volume||A persistent volume is a piece of networked storage (Persistent Disk on GCE, Elastic Block Store on AWS) mounted into a pod. The lifetime of a persistent volume is decoupled from the lifetime of the pod that's using it, ensuring that each CockroachDB node binds back to the same storage on restart.
The deployment tutorial assumes that dynamic volume provisioning is available. When that is not the case, persistent volume claims need to be created manually.
|RBAC||RBAC, or Role-Based Access Control, is the system Kubernetes uses to manage permissions within the cluster. In order to take an action (e.g.,