Google Cloud Filestore CSI driver for use in Kubernetes and other container orchestrators.
Disclaimer: This is not an officially supported Google product.
This driver allows volumes backed by Google Cloud Filestore instances to be dynamically created and mounted by workloads.
If multiple volumes are not needed, then Google Cloud Filestore instances can be manually created without this CSI driver and mounted using existing NFS volume plugins. Please see the Cloud Filestore documentation for more details.
This plugin is compatible with CSI version 0.2.0 and 0.3.0.
This plugin can be used beginning with Kubernetes v1.10.5
Supported CreateVolume parameters
This version of the driver creates a new Cloud Filestore instance per volume. Customizable parameters for volume creation include:
|"standard"||storage performance tier|
|location||string||zone where the plugin
is running in
|reserved-ipv4-cidr||string||""||CIDR range to allocate Filestore IP Ranges from.
The CIDR must be large enough to accommodate multiple Filestore IP Ranges of /29 each
For Kubernetes clusters, these parameters are specified in the StorageClass.
Note that non-default networks require extra firewall setup
- Non-root access: By default, GCFS instances are only writable by the root user and readable by all users. Provide a CreateVolume parameter to set non-root owners.
- Subdirectory provisioning: Given an existing Cloud Filestore instance, provision a subdirectory as a volume. This provisioning mode does not provide capacity isolation. Quota support needs investigation. For now, the nfs-client external provisioner can be used to provide similar functionality for Kubernetes clusters.
- Volume resizing: CSI does not have volume resizing support yet, but Cloud Filestore instances can currently be manually resized.
- Topology preferences: For better performance, it is recommended to run workloads in the same zone where the Cloud Filestore instance is provisioned in. In the future, the location where to create a Cloud Filestore instance could be automatically influenced by where the workload is scheduled.
Kubernetes User Guide
- One-time per project: Create GCP service account for the CSI driver and set the Cloud Filestore editor role.
# Optionally set a different directory to download the service account token. # Default is $HOME. # GCFS_SA_DIR=/another/directory ./deploy/project_setup.sh
- Deploy driver to Kubernetes cluster
- Create example StorageClass
kubectl apply -f ./examples/kubernetes/demo-sc.yaml
- Create example PVC and Pod
kubectl apply -f ./examples/kubernetes/demo-pod.yaml
Setup GCP service account first and setup Kubernetes cluster
$ ./deploy/project_setup.sh $ ./deploy/kubernetes/cluster_setup.sh
$ make $ make push # Modify manifests under deploy/kubernetes/manifests to use development image $ ./deploy/kubernetes/driver_start.sh
$ make skaffold-dev
$ dep ensure