setting up kubernetes cluster and running a database

387 views Asked by At

kubernetes cluster

This is my proposed kubernetes cluster, I want to be able to run Postgresql database, with my nodes accessing storage machine for storing the data, is this using NFS a good option? How best can I run a database instance here?

1

There are 1 answers

0
mhafshari On

I recommend you to use helm chart for deploying any kind of data base, it is very handy and easy to deploy, visit the link: https://github.com/bitnami/charts/tree/master/bitnami/postgresql

Any way if you want to deploy Postgresql, first of all you need to create persistent volume(pv) and persistent volume claim(pvc), because you choosed NFS for your cluster storage solution. You have to manually create your pv and pvc.

But kubernetes has storage class solution too, it is better to use some kubernetes volume plugin with internal provisioner like glusterfs or cephfs.

https://kubernetes.io/docs/concepts/storage/storage-classes/