kubernetes - GKE 中的私有集群如何对同一子网中的 GCP 计算实例 (VM) 进行身份验证?
问题描述
正如我们在本文档中看到的那样。默认情况下,同一子网中的虚拟机(GCP 计算实例)可以访问私有集群。这是文档中提到的内容:
From other VMs in the cluster's VPC network:
Other VMs can use kubectl to communicate with the private endpoint
only if they are in the same region as the cluster
and their internal IP addresses are included in
the list of master authorized networks.
我已经对此进行了测试:
- 集群可从与集群相同子网中的虚拟机访问
- 无法从不同子网中的虚拟机访问集群。
这个私有集群如何确定哪些虚拟机可以访问,哪些虚拟机要拒绝?
解决方案
它不受私有集群控制。
它由为 vpc 子网配置的路由和防火墙规则控制。即使在同一个 vpc 中,您也可以通过添加规则来禁用它们之间的通信。
推荐阅读
- javascript - 如何使用来自独立 node.js 应用程序的 ethers.js 连接到 Metamask 钱包?
- reactjs - 如何访问选定对象的值
- javascript - JSDoc:使用来自不同模块的 ES6 类和 @type 标签
- python - 将文本文件行的第一节和最后一节排序到字典中
- c# - 当 iPhone 用户退出主屏幕或 App Switcher 时,如何让我的计时器继续运行?
- python - 如何根据另一个数据框列值对数据框进行排序?
- vb.net - vb.net 什么是 %Delay% 和其他
- python - 是否可以仅使用 Python 计算图像中的白色像素?
- python - 如何使用集成模型从堆叠中获取每个基本模型的分数
- regex - Nginx 位置块与百分比符号不匹配