Connect Persistent Volume Kubernetes to SFTP Connect Persistent Volume Kubernetes to SFTP kubernetes kubernetes

Connect Persistent Volume Kubernetes to SFTP


There is code floating around for a FlexVolume plugin which delegates the actual mount to FUSE: https://github.com/adelton/kubernetes-flexvolume-fuse

But I have no idea if that will even compile anymore, and FlexVolume is on its way out in favor of CSI. You could write a CSI plugin on top of the FUSE FS but I don't know of any such thing already existing.

More commonly what you would do is use a RWX shared volume (such as NFS) and mount it to both the SFTP server and whatever your hosting app pod is.


We've been using this CSI SSHFS driver for a bit with Kubernetes 1.15.10 on Azure Kubernetes Service (AKS) and it works, though sometimes volumes get stuck unmounting when a pod is terminated (though that may be due to unrelated issues elsewhere in our cluster related to IOPS throttling):

https://github.com/chr-fritz/csi-sshfs

That project is not actively maintained, but it looks like someone may have taken up the torch to update and maintain it:

https://github.com/geoffh1977/csi-sshfs