Services and load balancer
By default, the ArangoDB Kubernetes Operator will also create an additionalservice to reach the ArangoDB deployment from outside the Kubernetes cluster.
For exposing the ArangoDB deployment to the outside, there are 2 options:
- Using a service. This will expose the deployment on a specific port (above 30.000)on all nodes of the Kubernetes cluster.
- Using a
LoadBalancerservice. This will expose the deployment on a load-balancerthat is provisioned by the Kubernetes cluster.
LoadBalancer option is the most convenient, but not all Kubernetes clustersare able to provision a load-balancer. Therefore we offer a third (and default) option:
Auto.In this option, the ArangoDB Kubernetes Operator tries to create a
LoadBalancerservice. It then waits for up to a minute for the Kubernetes cluster to provisiona load-balancer for it. If that has not happened after a minute, the serviceis replaced by a service of type
To inspect the created service, run:
To use the ArangoDB servers from outside the Kubernetes clusteryou have to add another service as explained below.
If you want to create external access services manually, follow the instructions below.
For a single server deployment, the operator creates a single
<deployment-name>. This service has a normal cluster IPaddress.
For a full cluster deployment, the operator creates two
Servicethat selects only the Coordinatorsof the cluster. This
Serviceis configured with
ClientIPsessionaffinity. This is needed for cursor requests, since they are bound toa specific Coordinator.
For a full cluster with datacenter replication deployment,the same
Services are created as for a Full cluster, with the followingadditions:
Servicethat selects only the syncmastersof the cluster.
If you want full control of the
Services needed to access the ArangoDB deploymentfrom outside your Kubernetes cluster, set of the
Noneand create a
Service as specified below.
Service of type
NodePort, depending on yourKubernetes deployment.
This service should select:
The following example yields a service of type
LoadBalancer with a specificload balancer IP address.With this service, the ArangoDB cluster can now be reached on