为Kubernetes Pod保留一系列静态IP [英] Reserve a range of static IPs for Kubernetes pods

查看:524
本文介绍了为Kubernetes Pod保留一系列静态IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Google Container Engine上构建Kubernetes集群,该集群的Pod会向互联网发出请求(传入或传出流量).这些传出连接必须限制为静态IP或一定范围.

I am attempting to build a Kubernetes cluster on Google Container Engine where its pods do requests to the internet (incoming or egress traffic). These outgoing connections must be limited to a static IP or limited to a range of them.

推荐答案

外部IP地址是GKE群集中节点计算机的IP地址.您可以从VPC网络=>外部IP地址为这些节点vm指定静态IP地址.

The external IP address is the IP address of the node machines in the GKE cluster. You can specify static IP address to these node vms from the VPC Network => External IP addresses.

一个更复杂的选择是创建一个 NAT网关在单独的VM上,然后通过它路由来自Kubernetes节点的所有流量.

A more complex option would be to create a NAT gateway on a separate VM and then route all the traffic from Kubernetes nodes through it.

这篇关于为Kubernetes Pod保留一系列静态IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆