大网数据广告活动
服务器运维问答

Master ipv4 CIDR configuration for private cluster in GCP

· 52CE 我爱测

I'm trying to create a private cluster in GCP as per the steps mentioned here: https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters As per this, the ipv4 address for the master node is set to 172.16.0.32/28. I …

问题原文

原帖链接 · Meghana B Srinath · CC BY-SA 4.0

I'm trying to create a private cluster in GCP as per the steps mentioned here: https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters

As per this, the ipv4 address for the master node is set to 172.16.0.32/28. I have also seen that the same CIDR blocks are used in many other examples as well. Is there a restriction that only this particular CIDR block should be used for master when configuring a GKE private cluster? If yes, then, can my VPC/subnets have a different range of CIDR , for ex, 10.1.0.0/16? As in, can the master node reside in one subnet and the nodes in a different subnet?

If there is no restriction on the master ipv4 address range, then can I use any RFC1918 range for this?

已采纳解答

原帖链接 · Armando Cuevas · CC BY-SA 4.0

The only restrictions, based on [1] public documentation, are:

Restrictions

Private clusters have the following restrictions:

  • ...

  • You cannot use a cluster master, node, Pod, or Service IP range that overlaps with 172.17.0.0/16.

  • ...

Limitations

Private clusters have the following limitations:

  • Each private cluster you create uses a unique VPC Network Peering.

  • Each VPC network can peer with up to 25 other VPC networks.

  • The size of the RFC 1918 block for the cluster master must be /28.

  • While GKE can detect overlap with the cluster master address block, it cannot detect overlap within a shared VPC network.

So basically you can use any private ip range that does not violates any of the rules stated before.

[1] https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#limitations

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-11-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。