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.
Status: Alpha
Latest image: gke.gcr.io/gcp-filestore-csi-driver:v0.2.0
Also see known issues and CHANGELOG.
This plugin is compatible with CSI version 0.2.0 and 0.3.0.
Filestore CSI Driver\Kubernetes Version | 1.10.5-1.11 | 1.12 | 1.13 | 1.14 |
---|---|---|---|---|
v0.1.0 (alpha) | yes | no | no | no |
v0.2.0 (alpha) | no | yes | yes | yes |
dev | no | yes | yes | yes |
This version of the driver creates a new Cloud Filestore instance per volume. Customizable parameters for volume creation include:
Parameter | Values | Default | Description |
---|---|---|---|
tier | "standard" "premium" |
"standard" | storage performance tier |
network | string | "default" | VPC name |
location | string | zone where the plugin is running in |
zone |
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.
- 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
./deploy/kubernetes/cluster_setup.sh
./deploy/kubernetes/driver_start.sh
- 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
- Modify Skaffold configuration and Kustomize overlays with your image registry
- Run skaffold
$ make skaffold-dev
Use dep
$ dep ensure