Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cannot write to gcsfuse mounted volumes on GKE

Hi, I am looking to use GCS buckets as volumes in my GKE pods. I am referring to the documentation here. I am able to read the files but cannot write inside any of the directories. Can someone help me figure out how to make the mount writable? Thank you in advance.

I uncommented the "readOnly: true" and also tried using the false values. Also added "fsGroup: 0". Neither of those options allowed me to write, even as root. Also, tried the options "
allow-other,file-mode=0777,dir-mode=0777" of standard gcsfuse. But looks like those are not supported in GKE.

I am using GKE version 1.31.6-gke.1020000. My service account has "Storage Admin" and "Storage Object User" permissions on the bucket.

apiVersion
v1
kindPod
metadata:
  namegcsfuse-test
  annotations:
    gke-gcsfuse/volumes"true"
spec:
  terminationGracePeriodSeconds60
  securityContext:
  fsGroup0
  containers:
  - imagebusybox
    namebusybox
    command: ["sleep"]
    args: ["infinity"]
    volumeMounts:
    - namegcsfuse-test
    mountPath/data
    # readOnly: true
  serviceAccountNamekubernetes-sa
  volumes:
  - namegcsfuse-test
      csi:
        drivergcsfuse.csi.storage.gke.io
        volumeAttributes:
          bucketNamemy-bucket-name
          mountOptions"implicit-dirs"
0 0 65
0 REPLIES 0
Top Labels in this Space
Top Solution Authors