prvate cluster access to Internet
- 创建一台有External IP的机器,系统建议使用ubuntu
- 执行以下初始化命令
1 | sudo sysctl -w net.ipv4.ip_forward=1 |
- 添加Firewal rules
souce: gke-node
Targets: gke-nat-proxy-6a6fec9d-node
Protocols and ports:tcp:1-65535,udp:1-65535,icmp
- 添加routes
destination:0.0.0.0/0
Priority:900
Instance tags:gke-node
Next hop:gke-nat-proxy-6a6fec9d-node
https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent