Sign inSign up

crate/crate-operator

By crate

โ€ขUpdated 13 days ago

CrateDB Kubernetes Operator

Image
0

10K+

crate/crate-operator repository overview

Continuous IntegrationDocs
Continuous IntegrationDocumentation

โ โš™๏ธ CrateDB Kubernetes Operator

The CrateDB Kubernetes Operator provides convenient way to run CrateDBโ  clusters inside Kubernetesโ . It is built on top of the Kopf: Kubernetes Operators Frameworkโ .

โ ๐Ÿคน Usage

A minimal custom resource for a 3 node CrateDB cluster may look like this:

dev-cluster.yaml:

apiVersion: cloud.crate.io/v1
kind: CrateDB
metadata:
  name: my-cluster
  namespace: dev
spec:
  cluster:
    imageRegistry: crate
    name: crate-dev
    version: 4.3.1
  nodes:
    data:
    - name: default
      replicas: 3
      resources:
        cpus: 4
        disk:
          count: 1
          size: 128GiB
          storageClass: default
        heapRatio: 0.5
        memory: 4Gi
$ kubectl --namespace dev create -f dev-cluster.yaml
...

$ kubectl --namespace dev get cratedbs
NAMESPACE   NAME         AGE
dev         my-cluster   36s

โ ๐ŸŽ‰ Features

  • "all equal nodes" cluster setup
  • "master + data nodes" cluster setup
  • safe scaling of clusters
  • safe rolling version upgrades for clusters
  • SSL for HTTP and PG connections via Let's Encrypt certificate
  • custom node settings
  • custom cluster settings
  • custom storage classes
  • region/zone awareness for AWS and Azure

โ ๐Ÿ’ฝ Installation

To be able to deploy the custom resource CrateDB to a Kubernetes cluster, the API needs to be extended with a Custom Resource Definition (CRD). The CRD for CrateDB can be found in the deploy/ folder and can be applied (assuming sufficient privileges).

$ git clone [email protected]:crate/crate-operator.git
...
$ cd crate-operator
$ kubectl apply -f deploy/crd.yaml
customresourcedefinition.apiextensions.k8s.io/cratedbs.cloud.crate.io created

Once the CRD is installed, the operator itself can be deployed using a Deployment in the crate-operator namespace.

$ kubectl create namespace crate-operator
...
$ kubectl create -f deploy/rbac.yaml
...
$ kubectl create -f deploy/deployment.yaml
...

Please refer to the configuration documentationโ  for further details.

โ ๐Ÿ’ป Development

Please refer to the Working on the operatorโ  section of the documentation.

Tag summary

Content type

Image

Digest

sha256:311ce788dโ€ฆ

Size

66.4 MB

Last updated

13 days ago

docker pull crate/crate-operator