Accessing Google Cloud persistent disk from both GKE and independent web server

388 Views Asked by At

Following this guide, I see how I can create a persistent disk in Google Cloud, than host it with an NFS server.

Now I have an NFS server I can use from my GKE nodes.

However, I want to also be able to post data to it from an independent web server, basically making it the only writer and the nodes the readers.

How can I access the disk remotely without deploying a VM instance of it?

Is it not a recommended use case for GC persistent disks?

2

There are 2 best solutions below

0
On

You could just use Cloud Filestore as a network attached file storage for Compute Engine instances and GKE instances. That way you could have multiple writers and readers

2
On

I do not believe it is possible as disks cannot be mounted as read/write on one instance and mounted as read only in another. NFS server would be the way to go.