Getting Started

Requirements

Kubernetes Versions The M3DB operator current targets Kubernetes 1.11 and 1.12. Given the operator’s current production use cases at Uber, we typically target the two most recent minor Kubernetes versions supported by GKE. We welcome community contributions to support more recent versions while meeting the aforementioned GKE targets! Multi-Zone Kubernetes Cluster The M3DB operator is intended to be used with Kubernetes clusters that span at least 3 zones within a region to create highly available clusters and maintain quorum in the event of region failures.
Read more arrow-right-circle

Installation

Be sure to take a look at the requirements before installing the operator. Helm Add the m3db-operator repo: helm repo add m3db https://m3-helm-charts.storage.googleapis.com/stable Install the m3db-operator chart: helm install m3db-operator m3db/m3db-operator Note: If uninstalling an instance of the operator that was installed with Helm, some resources such as the ClusterRole, ClusterRoleBinding, and ServiceAccount may need to be deleted manually. Manually Install the bundled operator manifests in the current namespace:
Read more arrow-right-circle

Creating a Cluster

Once you’ve installed the M3DB operator and read over the requirements, you can start creating some M3DB clusters! Basic Cluster The following creates an M3DB cluster spread across 3 zones, with each M3DB instance being able to store up to 350gb of data using your Kubernetes cluster’s default storage class. For examples of different cluster topologies, such as zonal clusters, see the docs on node affinity. Etcd Create an etcd cluster with persistent volumes:
Read more arrow-right-circle

Updating a Cluster

After your cluster has been running for some time you may decide you want to change the cluster’s spec. For instance, you may want to upgrade to a newer release of M3DB or modify the cluster’s config file. The operator can be used to safely rollout such changes so you don’t need to do anything other than add an annotation to enable updates. The first step in updating a cluster is to update the cluster’s M3DBCluster CRD with the changes you want to make.
Read more arrow-right-circle

Deleting a Cluster

Delete your M3DB cluster with kubectl: kubectl delete m3dbcluster simple-cluster By default, the operator will delete the placement and namespaces associated with a cluster before the CRD resource deleted. If you do not want this behavior, set keepEtcdDataOnDelete to true on your cluster spec. Under the hood, the operator uses Kubernetes finalizers to ensure the cluster CRD is not deleted until the operator has had a chance to do cleanup.
Read more arrow-right-circle

Monitoring

M3DB exposes metrics via a Prometheus endpoint. If using the Prometheus Operator, you can apply a ServiceMonitor to have your M3DB pods automatically scraped by Prometheus: kubectl apply -f https://raw.githubusercontent.com/m3db/m3db-operator/master/example/prometheus-servicemonitor.yaml You can visit the “targets” page of the Prometheus UI to verify the pods are being scraped. To view these metrics using Grafana, follow the M3 docs to install the M3DB Grafana dashboard.
Read more arrow-right-circle