在 CoreOS 上为 crunchy-postgresql-cluster 设置 nfs

setting up nfs for crunchy-postgresql-cluster on CoreOS

我正在考虑在 CoreOS Kubernetes 上安装 crunchy-postgresql-cluster。构建服务器时,我的云配置中没有 nfs 设置。

我查看了 crunchy-postgresql-cluster 文件 link crunchy-pgsql-values.yaml

并看到他们正在使用 nfs:

#NFSServerIP: 192.168.122.210
NFSServerIP: 10.138.154.1
NFSPath: /nfsfileshare

我换入了我的一个节点私有 ip,但是当我在我的 pod 上进行描述时看到以下错误:

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

我查看了 link 但仍然不确定如何让 nfs 工作。

如果这对其他人有帮助:

我在我的一个节点上设置了一个 NFS 服务器。

创建或更新 /etc/exports 条目以添加要共享的文件目录

/nfsfileshare <PRIVATE_IP>(rw,async)

执行了以下

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

sudo systemctl start nfsd 
sudo systemctl enable nfsd 

它奏效了。