menu
arrow_back

Using a NAT Gateway with Kubernetes Engine

45m access · 45m completion
Connection Details

5 Credits

info_outline
This lab costs 5 Credits to run. You can purchase credits or a subscription under My Account.

00:45:00

Using a NAT Gateway with Kubernetes Engine

GSP162

Google Cloud Self-Paced Labs

Overview

This lab uses the Modular NAT Gateway on Compute Engine for Terraform to automate creation of a NAT gateway managed instance group. You direct traffic from the instances by using tag-based routing, although only instances with matching tags use the NAT gateway route.

Under normal circumstances, Kubernetes Engine nodes route all egress traffic through the internet gateway associated with their node cluster. The internet gateway connection, in turn, is defined by the Compute Engine network associated with the node cluster. Each node in the cluster has an ephemeral external IP address. When nodes are created and destroyed during autoscaling, new node IP addresses are allocated automatically.

The default gateway behavior works well under normal circumstances. However, you might want to modify how ephemeral external IP addresses are allocated in order to:

  • Provide a third-party service with a consistent external IP address.
  • Monitor and filter egress traffic out of the Kubernetes Engine cluster.

In this lab, you will learn how to:

  • Create a NAT gateway instance and configure its routing details for an existing Kubernetes Engine cluster.
  • Create a custom routing rule for the NAT gateway instance.

The following diagram shows an overview of the architecture:

dd91182feb78ce53.png

Join Qwiklabs to read the rest of this lab...and more!

  • Get temporary access to the Google Cloud Console.
  • Over 200 labs from beginner to advanced levels.
  • Bite-sized so you can learn at your own pace.
Join to Start This Lab
home
Home
school
Catalog
menu
More
More