If you use your container in GKE and want to use gcsfuse, permissions should automatically be inherited locally in your account. Also ... there is a caution that you need to make sure that your cluster requires access to the repository. Therefore, make sure that your cluster has full access permissions set. This way, gcsfuse can mount your buckets on GCS in a container without worrying about transferring credential files and all that, which makes the implementation pretty simple.
In your docker file ... make sure you run your apt commands to get and install the gcsfuse application.
I personally created a shell script that I call upon completion of the instance that mounts my directories that I need.
Something like that...
Docker entry
ENTRYPOINT ["/opt/entry.sh"]
entry.sh script example
gcsfuse [gcs bucket name] [local folder to mount as]
When creating a GKE cluster, be sure to add a storage area
gcloud container clusters create [your cluster name] --scopes storage-full
Hope this helps you.
source share