简体   繁体   中英

Terraform GCP: Unable to reach Private Kubernetes Master to create kubernetes_secret

当我尝试使用来自另一个VPC的Master Authorized VM(执行Terraform配置)访问私有Kubernetes主机时,我无法访问它,并且Terraform错误创建了Kubernetes机密。

Error: dial tcp (master-public-or-private-endpoint):443: i/o timeout

Google Cloud VPCs are configured with private IP addresses ( RFC 1918 ). This means that VPCs cannot talk to each other using private IP addresses. RFC 1918 addresses are not routable outside the VPC.

You have a few solutions:

  • Using a public IP addresses for Kubernetes. However, that defeats the purpose of setting your cluster private.
  • Setup VPC Network Peering . This will connect the two VPCs together. The two VPCs cannot use overlapping CIDR ranges.
  • Setup a VPN server on GCE in one VPC and connect to the VPN server from the GCE instance in the other VPC.
  • Setup Google Cloud VPN .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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