Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 获得;调用者没有storage.objects.get访问Google云存储对象的权限。”;从GKE上的应用程序访问GCS文件时_Google Cloud Platform_Google Cloud Storage_Google Kubernetes Engine - Fatal编程技术网

Google cloud platform 获得;调用者没有storage.objects.get访问Google云存储对象的权限。”;从GKE上的应用程序访问GCS文件时

Google cloud platform 获得;调用者没有storage.objects.get访问Google云存储对象的权限。”;从GKE上的应用程序访问GCS文件时,google-cloud-platform,google-cloud-storage,google-kubernetes-engine,Google Cloud Platform,Google Cloud Storage,Google Kubernetes Engine,我正在尝试使用部署在GKE上的应用程序的RESTAPI访问GCS中的文件 我获得具有该URI的默认服务帐户令牌: 然后,当我使用获得的令牌检索GCS文件时,出现以下错误: “调用者没有storage.objects.get访问Google云存储对象。” 我真的不知道哪个服务帐户需要访问GCS存储桶。我尝试将它们全部添加到存储管理员角色中,但问题相同 在传统的Google Compute Engine VM上部署一个应用程序的类似过程运行良好(假设默认的Compute Engine服务帐户可以访问

我正在尝试使用部署在GKE上的应用程序的RESTAPI访问GCS中的文件

我获得具有该URI的默认服务帐户令牌:

然后,当我使用获得的令牌检索GCS文件时,出现以下错误: “调用者没有storage.objects.get访问Google云存储对象。”

我真的不知道哪个服务帐户需要访问GCS存储桶。我尝试将它们全部添加到存储管理员角色中,但问题相同

在传统的Google Compute Engine VM上部署一个应用程序的类似过程运行良好(假设默认的Compute Engine服务帐户可以访问bucket)


知道我做错了什么吗?

也许你的虚拟机或GKE对GCS只有写访问权限:在虚拟机配置中,如果设置为“为每个API设置访问权限”,请查找“标识和API访问”部分