Using Cloud Filestore
This guide describes how to set up and use Cloud Filestore with Kubeflow onGoogle Cloud Platform (GCP).
Cloud File Store is a fully managed NFS offering.Cloud Filestore is very useful for creating a shared filesystem that can be mounted into pods such as Jupyter.
This guide assumes you have already set up Kubeflow on GCP. If you haven’t doneso, follow the guide to .
This guide assumes the following settings:
- The environment variable contains the path toyour Kubeflow application directory, which holds your Kubeflow configurationfiles. For example,
/opt/my-kubeflow/
.
- The
${CONFIG_FILE}
environment variable contains the path to yourKubeflow configuration file.
export CONFIG_FILE=${KF_DIR}/kfctl_gcp_iap.0.7.1.yaml
- The
${KF_NAME}
environment variable contains the name of your Kubeflowdeployment. You can find the name in your${CONFIG_FILE}
configuration file, as the value for themetadata.name
key.
- The
${PROJECT}
environment variable contains the ID of your GCP project.You can find the project ID inyour${CONFIG_FILE}
configuraiton file, as the value for theproject
key.
- The
${ZONE}
environment variable contains the GCP zone where yourKubeflow resources are deployed.
export ZONE=<your GCP zone>
- For further background about the above settings, see the guide todeploying Kubeflow with the CLI.
Follow these instructions to create a Cloud Filestore instance; if you already have a Cloud Filestore instance you want touse you can skip this section.
Copy the Cloud Filestore deployment manager configs to the gcp_config
directory:
cd ${KF_DIR}
./gcp_config/
Edit gcfs.yaml
to match your desired configuration:
- Set name
- Set the value of parent to include your project e.g.
projects/${PROJECT}/locations/${ZONE}
Using :
cd ${KF_DIR}/gcp_config
gcloud --project=${PROJECT} deployment-manager deployments create ${KF_NAME}-nfs --config=gcfs.yaml
If you get an error legacy networks are not supported follow the instructionsin the troubleshooting guide.
Create a PVC for Cloud Filestore instance.
Run the following command to get the ip address of the cloud file store instance
gcloud --project=${PROJECT} filestore instances list
The output will be something like the following and give you the IP address of your instance.
INSTANCE_NAME ZONE TIER CAPACITY_GB FILE_SHARE_NAME IP_ADDRESS STATE CREATE_TIME
In the UI to create a jupyter notebook you can specify the PVC as an extra data volume.