在 GKE 中使用 gcsfuse 挂载存储桶

Mount bucket with gcsfuse in GKE

我正在尝试在 Google Cloud 中的 GKE 内部的容器中安装一个存储桶,但出现以下错误...有什么想法吗?

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

日志:

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 保险丝

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+

谢谢!!

将securityContext添加到容器的yaml中:

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