How to enable NAT on private GKE in GCP?

1/8/2020

I want to download some packages from the internet inside the pod for debugging purposes. By default, this is not allowed in private GKE as the nodes only have private IPs.

Kindly provide all the steps to perform to enable NAT?

-- k_vishwanath
cloud
google-cloud-platform
google-kubernetes-engine
nat

1 Answer

1/8/2020

You can follow instructions provided in the official documentation as it was suggested by @LundinCast or 3rd party example of using Cloud NAT with GKE Cluster, but I found useful for myself this article with an example of temporally solution for access to the Internet.

-- Serhii Rohoza
Source: StackOverflow