Skip to content

Commit a635528

Browse files
authored
chore: add aws ebs example (#263)
* chore: add aws ebs example
1 parent b3fbfff commit a635528

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

content/docs/get-started/self-host.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,38 @@ To keep data persistence in production, you need to use the [Persistent Volumes]
333333

334334
In AWS EKS, you can use the [Amazon EBS CSI driver](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) for persistent volumes. Follow the [managing EBS CSI](https://docs.aws.amazon.com/eks/latest/userguide/managing-ebs-csi.html) to add it as an Amazon EKS add-on.
335335

336+
Here is a simple example to use an EBS volume:
337+
338+
```yaml
339+
apiVersion: v1
340+
kind: PersistentVolumeClaim
341+
metadata:
342+
name: bytebase-ebs-claim
343+
spec:
344+
accessModes:
345+
- ReadWriteOnce
346+
storageClassName: bytebase-resize-sc
347+
resources:
348+
requests:
349+
storage: 4Gi
350+
---
351+
apiVersion: storage.k8s.io/v1
352+
kind: StorageClass
353+
metadata:
354+
name: bytebase-resize-sc
355+
provisioner: ebs.csi.aws.com
356+
allowVolumeExpansion: true
357+
```
358+
359+
**Note** Also need to update the statefulset spec of bytebase to replace the emptyDir volume with persistentVolumeClaim:
360+
361+
```yaml
362+
volumes:
363+
- name: bytebase-volume
364+
persistentVolumeClaim:
365+
claimName: bytebase-ebs-claim
366+
```
367+
336368
#### For Google Kubernetes Engine(GKE)
337369

338370
Please follow the [Persistent volumes and dynamic provisioning](https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes).

0 commit comments

Comments
 (0)