I’m trying to create a HA setup with multiple pods running (web servers). I’ve created a Longhorn volume and a nfs-provisioner share, so the pods can share contents. It works (even if slowly as nfs isn’t fast if latency is high) perfectly.
The problem is: if the node where nfs-provisioner is running goes down , the web server pods start complaining about a stale mount point. As health check, I’ve put a touch of a file on the nfs mounted directory, so they know something is wrong and restart. The problem is that even if the nfs-provisioner starts working on another node, I have to manually redeploy the web server pods, otherwise they restart and complain about "CreateContainerConfigError: failed to prepare subPath for volumeMount “webappnfsshared” of container “webapp”
As said, if I manually delete the pod, it’s recreated and mounts the share. Otherwise it detects it’s unavailable but continues to try.
Any suggestion? Thank you!