@@ -16,3 +16,60 @@ The amount of storage needed is configured using the
1616Note that configuring storage is done per group of servers.
1717It is not possible to configure storage per individual
1818server.
19+
20+ ## Local storage
21+
22+ For optimal performance, ArangoDB should be configured with locally attached
23+ SSD storage.
24+
25+ To accomplish this, one must create ` PersistentVolumes ` for all servers that
26+ need persistent storage (single, agents & dbservers).
27+ E.g. for a ` cluster ` with 3 agents and 5 dbservers, you must create 8 volumes.
28+
29+ Note that each volume must have a capacity that is equal to or higher than the
30+ capacity needed for each server.
31+
32+ To select the correct node, add a required node-affinity annotation as shown
33+ in the example below.
34+
35+ ``` yaml
36+ apiVersion : v1
37+ kind : PersistentVolume
38+ metadata :
39+ name : volume-agent-1
40+ annotations :
41+ " volume.alpha.kubernetes.io/node-affinity " : ' {
42+ "requiredDuringSchedulingIgnoredDuringExecution": {
43+ "nodeSelectorTerms": [
44+ { "matchExpressions": [
45+ { "key": "kubernetes.io/hostname",
46+ "operator": "In",
47+ "values": ["node-1"]
48+ }
49+ ]}
50+ ]}
51+ }'
52+ spec :
53+ capacity :
54+ storage : 100Gi
55+ accessModes :
56+ - ReadWriteOnce
57+ persistentVolumeReclaimPolicy : Delete
58+ storageClassName : local-ssd
59+ local :
60+ path : /mnt/disks/ssd1
61+ ` ` `
62+
63+ For Kubernetes 1.9 and up, you should create a ` StorageClass` which is configured
64+ to bind volumes on their first use as shown in the example below.
65+ This ensures that the Kubernetes scheduler takes all constraints on a `Pod`
66+ that into consideration before binding the volume to a claim.
67+
68+ ` ` ` yaml
69+ kind: StorageClass
70+ apiVersion: storage.k8s.io/v1
71+ metadata:
72+ name: local-ssd
73+ provisioner: kubernetes.io/no-provisioner
74+ volumeBindingMode: WaitForFirstConsumer
75+ ` ` `
0 commit comments