Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google compute engine 防火墙规则Google Compute Engine上所有新规则的默认范围值_Google Compute Engine_Google Cloud Platform_Kubernetes - Fatal编程技术网

Google compute engine 防火墙规则Google Compute Engine上所有新规则的默认范围值

Google compute engine 防火墙规则Google Compute Engine上所有新规则的默认范围值,google-compute-engine,google-cloud-platform,kubernetes,Google Compute Engine,Google Cloud Platform,Kubernetes,我有一个关于谷歌计算引擎联网的问题 是否有可能在您的帐户上设置默认的“源标记/IP范围”,以便在创建新规则时自动设置此值 例如,如果我创建此规则: gcloud beta compute firewall-rules create "test-net1-ssh-in" \ --allow tcp:22 \ --network "test-net1" \ --source-ranges "0.0.0.0/0" \ --target-tags "ssh-servers" 将(当然是

我有一个关于谷歌计算引擎联网的问题

是否有可能在您的帐户上设置默认的“源标记/IP范围”,以便在创建新规则时自动设置此值

例如,如果我创建此规则:

gcloud beta compute firewall-rules create "test-net1-ssh-in" \
  --allow tcp:22 \
  --network "test-net1" \
  --source-ranges "0.0.0.0/0" \
  --target-tags "ssh-servers"
将(当然是自动)替换为:

为什么这应该是有用的?因为我们希望在平台上创建的每个规则,自定义规则或自动生成的规则(来自kubernetes集群)将只允许或测试计算机IP

任何帮助都将不胜感激


谢谢:)

这目前在谷歌计算引擎中不是一个选项,但你正在寻找的功能至少会有。

嗨,亚历克斯,那就足够了,因为我们使用自动添加规则的脚本来管理部署,并且只有kubernetes是不被覆盖的。为每个名称空间规则制定策略可能会很有趣,例如“此NS中的所有服务都必须将源IP设置为X”
gcloud beta compute firewall-rules create "test-net1-ssh-in" \
  --allow tcp:22 \
  --network "test-net1" \
  --source-ranges "8.8.8.8/32" \
  --target-tags "ssh-servers"