0

I want to deploy a high performance (multi node) database. To do that, StatefulSet will be used. So, what should be used for sharing the content of the database between the pods of the StatefulSet application? NFS could do the work? or etcd?

Thanks,

Amine Jallouli
  • 3,919
  • 8
  • 36
  • 73

1 Answers1

0

What database do you want to use? etcd will not fit definitely, because it is a key\value storage service. If you want to use something like mongoDB then NFS should fit. Also look at the list of persistant volume types - https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes

arykalin
  • 393
  • 1
  • 3
  • 11
  • This repo [mappedinn/kubernetes-wordpress-with-nfs-volume-on-gke](https://github.com/mappedinn/kubernetes-wordpress-with-nfs-volume-on-gke) is having a problem even it is using **nfs**. Strange no? – Amine Jallouli May 07 '17 at 08:42
  • Could you be more specific? As I see the problem is not related to the NFS but to the container: `Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "wordpress" with CrashLoopBackOff: "Back-off 2m40s restarting failed container=wordpress pod=wp01-wordpress-2362719074-bv53t_default(44ba1226-306d-11e7-a0d1-42010a8e0084)"` I had same issue with postgres statefull set on cinder volume. – arykalin May 07 '17 at 15:56
  • How did you solved your problem with your postgres statefulset on cinder volume?? – Amine Jallouli May 08 '17 at 03:40
  • Just delete the pod and let kubernetes to recreate it. On my system this problem appears sometimes when docker container crashed or cinder is unavailable. To be honest I didn't investigate why it happens but it definitely not related to the NFS. – arykalin May 08 '17 at 11:44