无法在私有 Google Kubernetes Engine 上安装 helm chart(超时错误)

Unable to install helm chart on private Google Kubernetes Engine (timeout error)

我已经在 gke 中使用以下命令创建了一个私有集群

gcloud container clusters create private-cluster-0 \
--create-subnetwork name=my-subnet-0 \
--enable-master-authorized-networks \
--enable-ip-alias \
--enable-private-nodes \
--enable-private-endpoint \
--master-ipv4-cidr 172.16.0.32/28 \
--zone us-central1-a

然后我做了

gcloud container clusters get-credentials --zone us-central1-a private-cluster-0

我试图从本地计算机安装 helm chart,但出现以下错误:

Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "https://172.16.0.34/version?timeout=32s": dial tcp 172.16.0.34:443: i/o timeout

谁能告诉我如何解决这个错误。 如何将 helm chart 从本地机器部署到 gke 中的私有集群?

您创建了一个私有集群并尝试从本地机器安装 helm。
这不起作用,因为 172.16.0.0/12 范围是 non-routable,您的 PC 正在您自己的 LAN 中寻找集群。

您可以在 google docs 上找到有关访问私有 GKE 集群的信息。
google and medium.

还有更多关于在 GKE 上安装 helm 的通用教程