In the official Kubernetes documentation, I read:
To configure NFS storage, you can use the in-tree driver or the NFS CSI driver for Kubernetes (recommended).
My questions are:
- Why the NFS CSI driver is recommended over the NFS in-tree driver?
- Is there any known plan of deprecating the NFS in-tree driver ?
- If I don't need dynamic storage provisioning is there any advantage of using the NFS CSI driver over the NFS in-tree driver?
Why was the NFS CSI driver recommended over the NFS in-tree driver?
As per this official kubernetes documentation
The Container Storage Interface (CSI) was designed to help Kubernetes replace its existing, in-tree storage driver mechanisms - especially vendor specific plugins. Kubernetes support for the Container Storage Interface has been generally available since Kubernetes v1.13. Support for using CSI drivers was introduced to make it easier to add and maintain new integrations between Kubernetes and storage backend technologies.
Using CSI drivers allows for better maintainability (driver authors can define their own release cycle and support lifecycle) and reduce the opportunity for vulnerabilities (with less in-tree code, the risks of a mistake are reduced, and cluster operators can select only the storage drivers that their cluster requires).
Is there any known plan of deprecating the NFS in-tree driver ?
As per the official documentation provided above this is the timeline for depreciation of following in-tree drivers. However there isn’t any information available about NFS in-tree drivers.
If I don't need dynamic storage provisioning is there any advantage of using the NFS CSI driver over the NFS in-tree driver?
As per the official documentation CSI drivers are less prone to vulnerabilities as they contain only required drivers, hence as per security point of view it is suggested to use CSI drivers rather than using in-tree drivers. Since there isn’t much information available on NFS in-tree plugin depreciation cycle you can raise an issue here requesting more information on this.
You can also go through this documentation for further reference.