简体   繁体   English

GCP - 我们可以为负载均衡器/CDN 创建服务帐户吗?

[英]GCP - can we create service account for Load Balancer / CDN?

I have a Storage Bucket in GCP with a bunch of html files and images (just for testing purposes).我在 GCP 中有一个存储桶,其中包含一堆 html 文件和图像(仅用于测试目的)。 Let's call this my-bucket .我们称之为this my-bucket

I would like this to expose this via Cloud CDN .我希望通过Cloud CDN公开它。 I was able to create a Cloud CDN for the bucket.我能够为存储桶创建一个Cloud CDN

Cloud CDN also created a Load Balancer. Cloud CDN 还创建了一个负载均衡器。

If I try to access the load balancer IP, I get this error.如果我尝试访问负载均衡器 IP,我会收到此错误。

<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
</Error>

Should I be providing public read access to the bucket?我应该提供对存储桶的公共读取访问权限吗? How can I attach a service account to a LB for a better access?如何将服务帐户附加到 LB 以获得更好的访问权限?

If your bucket was set as publicly accessible, you can assign your cloud storage as the backend of your load balancer.如果您的存储桶设置为可公开访问,您可以将云存储分配为负载均衡器的后端。 This way, your bucket will be accessible via the load balancer IP address.这样,您的存储桶将可以通过负载均衡器 IP 地址访问。 This is possible as stated in this documentation .如本文档所述,这是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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