gpt4 book ai didi

google-kubernetes-engine - GKE VPC 原生集群和与 Cloud SQL 的连接

转载 作者:行者123 更新时间:2023-12-05 05:00:47 26 4
gpt4 key购买 nike

GKE集群中的“VPC Native”是什么?

“VPC Native disabled GKE cluster”是否限制通过私有(private) IP 连接到 Cloud SQL?我们有一个 GKE 集群,其“VPC Native”被禁用,我们在云 sql 中将 GKE 集群列入白名单,即使连接失败也是如此。

此外,从私有(private) GKE 集群连接云 sql 的推荐方法是什么?假设我们有一个要从 AWS 迁移到 GKE 的应用程序,我们不想构建云代理。

最佳答案

GKE 中的 VPC Native 改变了路由的建立方式来处理节点之间的 pod 流量。

In fact if you compare two clusters, one using VPC-native and the other using the legacy approach, now inexplicably called “advanced routing,” you’ll find they’re pretty much identical from the inside down to the command line arguments passed to the kubelet, kube-dns and kube-proxy on startup. So you’re not going to break anything switching your workloads to a VPC-native cluster, unless you’re doing something stranger than I can currently imagine as I write this.

查看此 article以查找更多详细信息。

what is the recommended way to connect cloud sql from private GKE cluster?

通过 documentation :

The Cloud SQL Proxy is the recommended way to connect to Cloud SQL, even when using private IP. This is because the proxy provides strong encryption and authentication using IAM, which can help keep your database secure.

即使你想创建一个 sloud sql 代理,它也是来自文档的推荐。 Here您可以找到有关 CloudSQL 连接的更多详细信息。

如本文档中所述,您需要将 GKE 集群和 CLoudSQL 置于同一网络中。

For connecting using private IP, the GKE cluster must be VPC-native and in the same VPC network as the Cloud SQL instance.

关于google-kubernetes-engine - GKE VPC 原生集群和与 Cloud SQL 的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62994977/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com