Reputation: 648
I have mounted a Filestore instance in my Kubernetes cluster. Can I upload some files from my local computer to the Filestore instance? It would be like uploading files to google drive, but in Filestore.
Upvotes: 1
Views: 1557
Reputation: 1420
Because the files you would like to upload are configuration and credentials files for your app, using Filestore doesn't look like the best choice. Filestore could be justified if you need some data mounted as ReadWriteMany
, because minimum volume size is 1Tb, and it's too much for configs and credentials.
Instead, a better way to achieve your goal would be using ConfigMaps to store configuration files and Secrets to store credentials. This should be also a cheaper option:
You are charged based on the provisioned capacity, not based on the capacity used. For example, if you create a 1 TiB instance and store 100 GiB of data on it, you incur charges for the entire 1 TiB.
Upvotes: 1
Reputation: 648
Connect to Filestore outside the VPC network is not possible.
But it is possible to upload/dowload files from a machine outside the VPC network to Google Storage.
So the solution is upload the files to Google storage and then copy them inside the cluster using a pod that executes gsutil rsync gs://bucket mount-directory
.
The pod can be replaced by a VM machine connected to the VPC network.
Upvotes: 1