6

Our application requires the presence of data on two filestores. On our current Kubernetes configuration, we use a persistent volume like so:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: fileserver-input
spec:
  capacity:
    storage: 1T
  accessModes:
  - ReadWriteMany
  nfs:
    path: /mypath
    server: XX.XXX.XXX.XXX

Which we then add as a volume in our deployment:

    volumeMounts:
      - mountPath: /mypath
        name: my-path

How can this be accomplished with Cloud Run on GKE? We have tried running commands to mount the filestore in the docker container, but we have not had success because the container does not run as privileged.

Is there a way to either specify a volumeMount like on regular GKE, or to run the container in privileged mode in Cloud Run on GKE?

3 Answers 3

1

Use the - -container-privileged flag to run a container with runtime privilege.

Run command similar to below:

gcloud compute instances create-with-container busybox-vm \
   --container-image docker.io/busybox:1.27 \
   --container-privileged

Remember to change image to your own.

More information you can find here: gcloud-containers.

I hope it helps.

1
  • 3
    Is there a way to mount/run as privileged in a fully managed instance of Cloud Run?
    – threed
    Jul 11, 2019 at 19:21
0

As I understand as of now it is not yet supported: https://cloud.google.com/run/docs/using-gcp-services

0
0

We just added support for network file systems to Cloud Run. Here's the documentation:

Filestore: https://cloud.google.com/run/docs/tutorials/network-filesystems-filestore Cloud Storage FUSE: https://cloud.google.com/run/docs/tutorials/network-filesystems-fuse Other: https://cloud.google.com/run/docs/using-network-file-systems

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .