阅读完前面的问题后,我有一些后续问题。我有一个缺少 Cloud Monitoring API 访问权限的 Google Container Engine 集群。根据这篇文章,我无法启用它。
引用的帖子已有一年历史。只是为了确定:它仍然正确吗?要为我的 GKE 集群启用(例如)Cloud Monitoring API,我们必须重新创建整个集群,因为在集群创建后无法更改这些权限?
此外,如果我必须这样做,在我看来,最好以尽可能广泛的权限启用所有 API,以防万一我想在我的生产集群上开始使用其中一个在使用中时我不能很好地取下整个东西然后重新创建它。这种方法有什么缺点吗?
我正在使用启用了 istio 附加组件的 GKE。使用 websocket 时,Myapp 以某种方式给出了 503 错误。我开始认为 websocket 可能正在工作,但数据库连接没有工作,这会导致 503,因为 cloudsql-proxy 日志给出了错误:
$ kubectl logs myapp-54d6696fb4-bmp5m cloudsql-proxy
2019/01/04 21:56:47 using credential file for authentication; email=proxy-user@myproject.iam.gserviceaccount.com
2019/01/04 21:56:47 Listening on 127.0.0.1:5432 for myproject:europe-west4:mydatabase
2019/01/04 21:56:47 Ready for new connections
2019/01/04 21:56:51 New connection for "myproject:europe-west4:mydatabase"
2019/01/04 21:56:51 couldn't connect to "myproject:europe-west4:mydatabase": Post https://www.googleapis.com/sql/v1beta4/projects/myproject/instances/mydatabase/createEphemeral?alt=json: oauth2: cannot fetch token: Post https://oauth2.googleapis.com/token: read tcp 10.44.11.21:60728->108.177.126.95:443: read: connection reset by peer
2019/01/04 22:14:56 New connection for "myproject:europe-west4:mydatabase"
2019/01/04 22:14:56 couldn't connect to "myproject:europe-west4:mydatabase": …Run Code Online (Sandbox Code Playgroud) google-cloud-sql google-cloud-platform kubernetes google-kubernetes-engine cloud-sql-proxy
kubernetes ×2