Skip to content

Commit 6040059

Browse files
committed
Improved Service documentation
1 parent 265397d commit 6040059

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

docs/Manual/Deployment/Kubernetes/ServicesAndLoadBalancer.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,50 +39,53 @@ If you want to create external access services manually, follow the instructions
3939
### Single server
4040

4141
For a single server deployment, the operator creates a single
42-
`Service` named `<cluster-name>`. This service has a normal cluster IP
42+
`Service` named `<deployment-name>`. This service has a normal cluster IP
4343
address.
4444

4545
### Full cluster
4646

4747
For a full cluster deployment, the operator creates two `Services`.
4848

49-
- `<cluster-name>_servers` a headless `Service` intended to provide
49+
- `<deployment-name>-int` a headless `Service` intended to provide
5050
DNS names for all pods created by the operator.
5151
It selects all ArangoDB & ArangoSync servers in the cluster.
5252

53-
- `<cluster-name>` a normal `Service` that selects only the coordinators
53+
- `<deployment-name>` a normal `Service` that selects only the coordinators
5454
of the cluster. This `Service` is configured with `ClientIP` session
5555
affinity. This is needed for cursor requests, since they are bound to
5656
a specific coordinator.
5757

5858
When the coordinators are asked to provide endpoints of the cluster
5959
(e.g. when calling `client.SynchronizeEndpoints()` in the go driver)
6060
the DNS names of the individual `Pods` will be returned
61-
(`<pod>.<cluster-name>_servers.<namespace>.svc`)
61+
(`<pod>.<deployment-name>-int.<namespace>.svc`)
6262

6363
### Full cluster with DC2DC
6464

6565
For a full cluster with datacenter replication deployment,
6666
the same `Services` are created as for a Full cluster, with the following
6767
additions:
6868

69-
- `<cluster-name>_sync` a normal `Service` that selects only the syncmasters
69+
- `<deployment-name>-sync` a normal `Service` that selects only the syncmasters
7070
of the cluster.
7171

7272
## Load balancer
7373

74-
To reach the ArangoDB servers from outside the Kubernetes cluster, you
75-
have to deploy additional services.
74+
If you want full control of the `Services` needed to access the ArangoDB deployment
75+
from outside your Kubernetes cluster, set `spec.externalAccess.Type` of the `ArangoDeployment` to `None`
76+
and create a `Service` as specified below.
7677

77-
You can use `LoadBalancer` or `NodePort` services, depending on your
78+
Create a `Service` of type `LoadBalancer` or `NodePort`, depending on your
7879
Kubernetes deployment.
7980

8081
This service should select:
8182

82-
- `arangodb_cluster_name: <cluster-name>`
83+
- `arango_deployment: <deployment-name>`
8384
- `role: coordinator`
8485

85-
For example:
86+
The following example yields a service of type `LoadBalancer` with a specific
87+
load balancer IP address.
88+
With this service, the ArangoDB cluster can now be reached on `https://1.2.3.4:8529`.
8689

8790
```yaml
8891
kind: Service
@@ -91,7 +94,27 @@ metadata:
9194
name: arangodb-cluster-exposed
9295
spec:
9396
selector:
94-
arangodb_cluster_name: arangodb-cluster
97+
arango_deployment: arangodb-cluster
98+
role: coordinator
99+
type: LoadBalancer
100+
loadBalancerIP: 1.2.3.4
101+
ports:
102+
- protocol: TCP
103+
port: 8529
104+
targetPort: 8529
105+
```
106+
107+
The following example yields a service of type `NodePort` with the ArangoDB
108+
cluster exposed on port 30529 of all nodes of the Kubernetes cluster.
109+
110+
```yaml
111+
kind: Service
112+
apiVersion: v1
113+
metadata:
114+
name: arangodb-cluster-exposed
115+
spec:
116+
selector:
117+
arango_deployment: arangodb-cluster
95118
role: coordinator
96119
type: NodePort
97120
ports:

0 commit comments

Comments
 (0)