You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,59 +13,28 @@ For more information, see xref:kubernetes/accessing-neo4j.adoc[Accessing Neo4j].
13
13
14
14
You can perform a backup of a Neo4j database(s) to any cloud provider (AWS, GCP, and Azure) bucket using the _neo4j/neo4j-admin_ Helm chart.
15
15
From Neo4j 5.10.0, the _neo4j/neo4j-admin_ Helm chart also supports performing a backup of multiple databases.
16
+
And from 5.13.0, the _neo4j/neo4j-admin_ Helm chart also supports workload identity integration for GCP, AWS, and Azure.
16
17
17
18
=== Prerequisites
18
19
19
20
Before you can back up a database and upload it to your bucket, verify that you have the following:
20
21
21
22
* A cloud provider bucket (AWS, GCP, or Azure) with read and write access to be able to upload the backup.
22
23
* Credentials to access the cloud provider bucket, such as a service account JSON key file for GCP, a credentials file for AWS, or storage account credentials for Azure.
24
+
* A service account with workload identity if you want to use workload identity integration to access the cloud provider bucket.
25
+
** For more information on setting up a service account with workload identity on GCP and AWS, see:
26
+
*** link:https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity[Google Kubernetes Engine (GKE) -> Use Workload Identity]
27
+
*** link:https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[Amazon EKS -> Configuring a Kubernetes service account to assume an IAM role]
28
+
** For more information on setting up an Azure storage account with workload identity, link:https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=go[Microsoft Azure -> Use Microsoft Entra Workload ID with Azure Kubernetes Service (AKS)]
23
29
* A Kubernetes cluster running on one of the cloud providers with the Neo4j Helm chart installed.
24
30
For more information, see xref:kubernetes/quickstart-standalone/index.adoc[Quickstart: Deploy a standalone instance] or xref:kubernetes/quickstart-cluster/index.adoc[Quickstart: Deploy a cluster].
31
+
* The latest Neo4j Helm charts.
32
+
You can update the repository to get the latest charts using `helm repo update`.
25
33
26
-
=== Steps
34
+
=== Create a Kubernetes secret
27
35
28
-
To perform a backup of a Neo4j database to any cloud provider (AWS, GCP, and Azure) bucket, follow these steps:
36
+
You can create a Kubernetes secret with the credentials that can access the cloud provider bucket using one of the following options:
29
37
30
-
. Update the repository to get the latest charts:
31
-
+
32
-
[source, shell, role='noheader']
33
-
----
34
-
helm repo update
35
-
----
36
-
. Configure the credentials to access the cloud provider bucket by either using a service account or a Kubernetes secret:
37
-
+
38
-
Service account::
39
-
In some deployment situations, it may be desirable to assign a Kubernetes Service Account to the Neo4j pod.
40
-
For example, if processes in the pod want to connect to services that require Service Account authorization.
41
-
To configure the Neo4j pod to use a Kubernetes service account, set `podSpec.serviceAccountName` to the name of the service account to use.
42
-
+
43
-
For example:
44
-
+
45
-
[source, yaml]
46
-
----
47
-
# neo4j-values.yaml
48
-
neo4j:
49
-
password: "my-password"
50
-
51
-
podSpec:
52
-
serviceAccountName: "sa-name"
53
-
----
54
-
+
55
-
[NOTE]
56
-
====
57
-
The service account must already exist.
58
-
The Neo4j Helm chart does not create or configure Service Accounts.
59
-
For more information on setting up a service account with workload identity, see the respective cloud provider documentation:
60
-
61
-
* link:https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=go[Microsoft Azure -> Use Microsoft Entra Workload ID with Azure Kubernetes Service (AKS)]
62
-
* link:https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity[Google Kubernetes Engine (GKE) -> Use Workload Identity]
63
-
* link:https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[Amazon EKS -> Configuring a Kubernetes service account to assume an IAM role]
64
-
====
65
-
66
-
Kubernetes secret::
67
-
Alternatively, you can create a Kubernetes secret with the credentials to access the cloud provider bucket using one of the following options:
. Configure the backup parameters in the _backup-values.yaml_ file by providing either `secretName` and `secretKeyName` or `serviceAccountName` as per your cloud provider:
120
-
+
88
+
=== Configure the backup parameters
89
+
90
+
You can configure the backup parameters in the _backup-values.yaml_ file either by using the `secretName` and `secretKeyName` parameters or by mapping the Kubernetes service account
91
+
to the workload identity integration.
92
+
121
93
[NOTE]
122
94
====
123
95
The following examples show the minimum configuration required to perform a backup to a cloud provider bucket.
124
96
For more information about the available backup parameters, see <<kubernetes-neo4j-backup-parameters, Backup parameters>>.
125
97
====
126
-
+
98
+
99
+
==== Configure the _backup-values.yaml_ file using the `secretName` and `secretKeyName` parameters
100
+
101
+
[.tabbed-example]
102
+
=====
103
+
[.include-with-gke]
104
+
======
105
+
[source, yaml, role='noheader']
106
+
----
107
+
neo4j:
108
+
image: "neo4j/helm-charts-backup"
109
+
imageTag: "5.10.0"
110
+
jobSchedule: "* * * * *"
111
+
successfulJobsHistoryLimit: 3
112
+
failedJobsHistoryLimit: 1
113
+
backoffLimit: 3
114
+
115
+
backup:
116
+
bucketName: "my-bucket"
117
+
databaseAdminServiceName: "standalone-admin" #This is the Neo4j Admin Service name.
118
+
database: "neo4j,system"
119
+
cloudProvider: "gcp"
120
+
secretName: "gcpcreds"
121
+
secretKeyName: "credentials"
122
+
123
+
consistencyCheck:
124
+
enabled: true
125
+
----
126
+
======
127
+
128
+
[.include-with-aws]
129
+
======
130
+
[source, yaml, role='noheader']
131
+
----
132
+
neo4j:
133
+
image: "neo4j/helm-charts-backup"
134
+
imageTag: "5.10.0"
135
+
jobSchedule: "* * * * *"
136
+
successfulJobsHistoryLimit: 3
137
+
failedJobsHistoryLimit: 1
138
+
backoffLimit: 3
139
+
140
+
backup:
141
+
bucketName: "my-bucket"
142
+
databaseAdminServiceName: "standalone-admin"
143
+
database: "neo4j,system"
144
+
cloudProvider: "aws"
145
+
secretName: "awscreds"
146
+
secretKeyName: "credentials"
147
+
148
+
consistencyCheck:
149
+
enabled: true
150
+
----
151
+
======
152
+
153
+
[.include-with-azure]
154
+
======
155
+
[source, yaml, role='noheader']
156
+
----
157
+
neo4j:
158
+
image: "neo4j/helm-charts-backup"
159
+
imageTag: "5.10.0"
160
+
jobSchedule: "* * * * *"
161
+
successfulJobsHistoryLimit: 3
162
+
failedJobsHistoryLimit: 1
163
+
backoffLimit: 3
164
+
165
+
backup:
166
+
bucketName: "my-bucket"
167
+
databaseAdminServiceName: "standalone-admin"
168
+
database: "neo4j,system"
169
+
cloudProvider: "azure"
170
+
secretName: "azurecreds"
171
+
secretKeyName: "credentials"
172
+
173
+
consistencyCheck:
174
+
enabled: true
175
+
----
176
+
======
177
+
=====
178
+
179
+
==== Configure the _backup-values.yaml_ file using service account workload identity integration
180
+
181
+
In some deployment situations, it may be desirable to assign a Kubernetes Service Account to the Neo4j backup pod.
182
+
For example, if processes in the pod want to connect to services that require Service Account authorization.
183
+
To configure the Neo4j backup pod to use a Kubernetes service account, set `serviceAccountName` to the name of the service account to use.
184
+
For Azure deployments, you also need to set the `azureStorageAccountName` parameter to the name of the Azure storage account, where the backup files will be uploaded.
185
+
For example:
186
+
127
187
[.tabbed-example]
128
188
=====
129
189
[.include-with-gke]
@@ -133,6 +193,7 @@ For more information about the available backup parameters, see <<kubernetes-neo
133
193
neo4j:
134
194
image: "neo4j/helm-charts-backup"
135
195
imageTag: "5.13.0"
196
+
serviceAccountName: "demo-service-account"
136
197
jobSchedule: "* * * * *"
137
198
successfulJobsHistoryLimit: 3
138
199
failedJobsHistoryLimit: 1
@@ -143,9 +204,8 @@ backup:
143
204
databaseAdminServiceName: "standalone-admin" #This is the Neo4j Admin Service name.
144
205
database: "neo4j,system"
145
206
cloudProvider: "gcp"
146
-
#secretName: "gcpcreds"
147
-
#secretKeyName: "credentials"
148
-
#gcpServiceAccountName: "gcp-sa"
207
+
secretName: "gcpcreds"
208
+
secretKeyName: "credentials"
149
209
150
210
consistencyCheck:
151
211
enabled: true
@@ -159,6 +219,7 @@ consistencyCheck:
159
219
neo4j:
160
220
image: "neo4j/helm-charts-backup"
161
221
imageTag: "5.13.0"
222
+
serviceAccountName: "demo-service-account"
162
223
jobSchedule: "* * * * *"
163
224
successfulJobsHistoryLimit: 3
164
225
failedJobsHistoryLimit: 1
@@ -169,9 +230,8 @@ backup:
169
230
databaseAdminServiceName: "standalone-admin"
170
231
database: "neo4j,system"
171
232
cloudProvider: "aws"
172
-
#secretName: "awscreds"
173
-
#secretKeyName: "credentials"
174
-
#awsServiceAccountName: "aws-sa"
233
+
secretName: "awscreds"
234
+
secretKeyName: "credentials"
175
235
176
236
consistencyCheck:
177
237
enabled: true
@@ -185,6 +245,7 @@ consistencyCheck:
185
245
neo4j:
186
246
image: "neo4j/helm-charts-backup"
187
247
imageTag: "5.13.0"
248
+
serviceAccountName: "demo-service-account"
188
249
jobSchedule: "* * * * *"
189
250
successfulJobsHistoryLimit: 3
190
251
failedJobsHistoryLimit: 1
@@ -195,45 +256,30 @@ backup:
195
256
databaseAdminServiceName: "standalone-admin"
196
257
database: "neo4j,system"
197
258
cloudProvider: "azure"
198
-
#secretName: "azurecreds"
199
-
#secretKeyName: "credentials"
200
-
#azureStorageAccountName: "storageAccountName"
259
+
azureStorageAccountName: "storageAccountName"
201
260
202
261
consistencyCheck:
203
262
enabled: true
204
263
----
205
264
======
206
265
=====
207
-
+
208
266
The _/backups_ mount created by default is an _emptyDir_ type volume.
209
267
This means that the data stored in this volume is not persistent and will be lost when the pod is deleted.
210
268
To use a persistent volume for backups add the following section to the _backup-values.yaml_ file:
211
-
+
269
+
212
270
[source, yaml, role='noheader']
213
271
----
214
272
tempVolume:
215
273
persistentVolumeClaim:
216
274
claimName: backup-pvc
217
275
----
218
-
+
276
+
219
277
[NOTE]
220
278
====
221
279
You need to create the persistent volume and persistent volume claim before installing the _neo4j-admin_ Helm chart.
222
280
For more information, see xref:kubernetes/persistent-volumes.adoc[Volume mounts and persistent volumes].
223
281
====
224
282
225
-
. Install _neo4j-admin_ Helm chart using the _backup-values.yaml_ file:
The _neo4j/neo4j-admin_ Helm chart installs a cronjob that launches a pod based on the job schedule. This pod performs a backup of one or multiple databases, a consistency check of the backup file(s), and uploads them to the cloud provider bucket.
233
-
234
-
. Monitor the backup pod logs using `kubectl logs pod/<neo4j-backup-pod-name>` to check the progress of the backup.
235
-
. Check that the backup files and the consistency check reports have been uploaded to the cloud provider bucket.
236
-
237
283
[[kubernetes-neo4j-backup-parameters]]
238
284
=== Backup parameters
239
285
@@ -438,6 +484,21 @@ tolerations: []
438
484
# effect: "NoSchedule"
439
485
----
440
486
487
+
=== Install the _neo4j-admin_ Helm chart
488
+
489
+
. Install _neo4j-admin_ Helm chart using the _backup-values.yaml_ file:
0 commit comments