简体   繁体   中英

Mount bucket with gcsfuse in GKE

I'm trying to mount a bucket in a container inside of GKE in Google Cloud, but I have the following error ... Any ideas?

gcsfuse -o nonempty --foreground --debug_fuse --debug_fuse --debug_http --debug_invariants --key-file=credentials.json bucket-example /tmp/test

Log:

http: ========== RESPONSE:
HTTP/2.0 200 OK
Content-Length: 31
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application/json; charset=UTF-8
Server: UploadServer
Vary: Origin
Vary: X-Origin

{
 "kind": "storage#objects"
}
http: ====================
Mounting file system...
mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1

stderr:
fusermount: fuse device not found, try 'modprobe fuse' first

modprobe fuse

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.64+/modules.dep.bin'
modprobe: FATAL: Module fuse not found in directory /lib/modules/4.4.64+

uname -r

4.4.64+

THX!!

Add securityContext to the yaml of the container:

    image: example:latest
    name: example-name
    securityContext:
      privileged: true
      capabilities:
        add:
          - SYS_ADMIN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM