The CrateDB Kubernetes Operator provides convenient way to run CrateDBโ clusters inside Kubernetesโ . It is built on top of the Kopf: Kubernetes Operators Frameworkโ .
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
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.
Please refer to the Working on the operatorโ section of the documentation.
Content type
Image
Digest
sha256:311ce788dโฆ
Size
66.4 MB
Last updated
13 days ago
docker pull crate/crate-operator