Skip to content

Commit

Permalink
chore: add aws ebs example (#263)
Browse files Browse the repository at this point in the history
* chore: add aws ebs example
  • Loading branch information
zll600 authored Dec 25, 2023
1 parent b3fbfff commit a635528
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions content/docs/get-started/self-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,38 @@ To keep data persistence in production, you need to use the [Persistent Volumes]

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.

Here is a simple example to use an EBS volume:

```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: bytebase-ebs-claim
spec:
accessModes:
- ReadWriteOnce
storageClassName: bytebase-resize-sc
resources:
requests:
storage: 4Gi
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: bytebase-resize-sc
provisioner: ebs.csi.aws.com
allowVolumeExpansion: true
```

**Note** Also need to update the statefulset spec of bytebase to replace the emptyDir volume with persistentVolumeClaim:

```yaml
volumes:
- name: bytebase-volume
persistentVolumeClaim:
claimName: bytebase-ebs-claim
```

#### For Google Kubernetes Engine(GKE)

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

1 comment on commit a635528

@vercel
Copy link

@vercel vercel bot commented on a635528 Dec 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.