Skip to content

This project presents a number of best practices for establishing network links between Kubernetes Engine clusters, and exposing cluster services across Google Cloud projects. You will use a set of Deployment Manager templates to create networks, subnets, vpn connections, and Kubernetes Engine clusters.

License

Notifications You must be signed in to change notification settings

GoogleCloudPlatform/gke-networking-demos

Repository files navigation

Kubernetes Engine Networking

Introduction

Google cloud networking with Kubernetes Engine clusters can be complex. Assigning optimal CIDR ranges for the relevant VPC subnets and the Kubernetes Engine clusters' reserved IP ranges from the start is very important since VPC subnets are not always easy to resize and the cluster's reserved IP ranges are immutable. Using the correct method to expose the applications in the cluster is important as every method was designed for a different set of use cases.

The demos in the project demonstrate the following best practices:

  1. Connecting two GCP networks using VPC peering and Cloud VPN containing two Kubernetes Engine clusters each.
  2. Deploying the nginx pods.
  3. Exposing the pods using Kubernetes Engine services
  4. Validating pod-to-service communication across the Kubernetes Engine clusters within the same region and the different regions.

Prerequisites

Tools

  1. Google Cloud SDK version >= 253.0.0
  2. kubectl matching the latest GKE version
  3. bash or bash compatible shell
  4. jq

Install Cloud SDK

The Google Cloud SDK is used to interact with your GCP resources. Installation instructions for multiple platforms are available online.

Install kubectl CLI

The kubectl CLI is used to interteract with both Kubernetes Engine and kubernetes in general. Installation instructions for multiple platforms are available online.

Directory Structure

  1. The gke-to-gke-peering and gke-to-gke-vpn folders each contain a project.
  2. README files exist for the above examples; gke-to-gke-peering/README.md and gke-to-gke-vpn/README.md.
  3. The network folder contains the manifest files and deployment manager templates to setup networks.
  4. The clusters folder contains the manifest files and deployment manager templates to create Kubernetes Engine clusters.
  5. The manifests folder contains the manifest files to create Kubernetes Engine services.

This is not an officially supported Google product

About

This project presents a number of best practices for establishing network links between Kubernetes Engine clusters, and exposing cluster services across Google Cloud projects. You will use a set of Deployment Manager templates to create networks, subnets, vpn connections, and Kubernetes Engine clusters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published