Using the ArangoDB Kubernetes Operator

Installation

The ArangoDB Kubernetes Operator needs to be installed in your Kubernetescluster first.

If you have Helm available, we recommend installation using Helm.

Installation with Helm

To install the ArangoDB Kubernetes Operator with helm,run (replace <version> with the version of the operator that you want to install):

  1. export URLPREFIX=https://github.com/arangodb/kube-arangodb/releases/download/<version>
  2. helm install $URLPREFIX/kube-arangodb-crd.tgz
  3. helm install $URLPREFIX/kube-arangodb.tgz

This installs operators for the ArangoDeployment and ArangoDeploymentReplicationresource types.

If you want to avoid the installation of the operator for the ArangoDeploymentReplicationresource type, add —set=DeploymentReplication.Create=false to the helm installcommand.

To use ArangoLocalStorage resources, also run:

  1. helm install $URLPREFIX/kube-arangodb-storage.tgz

For more information on installing with Helm and how to customize an installation,see Using the ArangoDB Kubernetes Operator with Helm.

Installation with Kubectl

To install the ArangoDB Kubernetes Operator without Helm,run (replace <version> with the version of the operator that you want to install):

  1. export URLPREFIX=https://raw.githubusercontent.com/arangodb/kube-arangodb/<version>/manifests
  2. kubectl apply -f $URLPREFIX/arango-crd.yaml
  3. kubectl apply -f $URLPREFIX/arango-deployment.yaml

To use ArangoLocalStorage resources, also run:

  1. kubectl apply -f $URLPREFIX/arango-storage.yaml

To use ArangoDeploymentReplication resources, also run:

  1. kubectl apply -f $URLPREFIX/arango-deployment-replication.yaml

You can find the latest release of the ArangoDB Kubernetes Operatorin the kube-arangodb repository.

ArangoDB deployment creation

Once the operator is running, you can create your ArangoDB database deploymentby creating a ArangoDeployment custom resource and deploying it into yourKubernetes cluster.

For example (all examples can be found in the kube-arangodb repository):

  1. kubectl apply -f examples/simple-cluster.yaml

Deployment removal

To remove an existing ArangoDB deployment, delete the customresource. The operator will then delete all created resources.

For example:

  1. kubectl delete -f examples/simple-cluster.yaml

Note that this will also delete all data in your ArangoDB deployment!

If you want to keep your data, make sure to create a backup before removing the deployment.

Operator removal

To remove the entire ArangoDB Kubernetes Operator, remove allclusters first and then remove the operator by running:

  1. helm delete <release-name-of-kube-arangodb-chart>
  2. # If `ArangoLocalStorage` operator is installed
  3. helm delete <release-name-of-kube-arangodb-storage-chart>

or when you used kubectl to install the operator, run:

  1. kubectl delete deployment arango-deployment-operator
  2. # If `ArangoLocalStorage` operator is installed
  3. kubectl delete deployment -n kube-system arango-storage-operator
  4. # If `ArangoDeploymentReplication` operator is installed
  5. kubectl delete deployment arango-deployment-replication-operator

See also