setting up nfs for crunchy-postgresql-cluster on CoreOS

3/12/2017

I am looking at installing crunchy-postgresql-cluster on CoreOS Kubernetes. I didn't have nfs setup in my cloud-config when I built my server.

I looked at crunchy-postgresql-cluster file link crunchy-pgsql-values.yaml

And see that they are using nfs:

#NFSServerIP: 192.168.122.210
NFSServerIP: 10.138.154.1
NFSPath: /nfsfileshare

I swapped in one of my nodes private ip but I see the following error when I do a describe on my pod:

timeout expired waiting for volumes to attach/mount for pod "default"/"banking-seagull-crunchy-master". list of unattached/unmounted volumes=[pgdata]

I looked at link but still not sure how to get nfs working.

-- Sonam
coreos
kubernetes
nfs

1 Answer

3/14/2017

if this helps others:

I set up a NFS server on one of my nodes.

create or update /etc/exports entry to add a file dir to share

/nfsfileshare <PRIVATE_IP>(rw,async)

Executed the following

sudo systemctl start rpc-mountd
sudo systemctl enable rpc-mountd

sudo systemctl start nfsd 
sudo systemctl enable nfsd 

and it worked.

-- Sonam
Source: StackOverflow