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
kind: Pod
metadata:
name: gcsfuse-test
annotations:
gke-gcsfuse/volumes: “true”
spec:
terminationGracePeriodSeconds: 60
securityContext:
fsGroup: 0
containers:

  • image: busybox
    name: busybox
    command: [“sleep”]
    args: [“infinity”]
    volumeMounts:
  • name: gcsfuse-test
    mountPath: /data

readOnly: true

serviceAccountName: kubernetes-sa
volumes:

  • name: gcsfuse-test
    csi:
    driver: gcsfuse.csi.storage.gke.io
    volumeAttributes:
    bucketName: my-bucket-name
    mountOptions: “implicit-dirs”