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:
- Connecting two GCP networks using VPC peering and Cloud VPN containing two Kubernetes Engine clusters each.
- Deploying the nginx pods.
- Exposing the pods using Kubernetes Engine services
- Validating pod-to-service communication across the Kubernetes Engine clusters within the same region and the different regions.
- Google Cloud SDK version >= 253.0.0
- kubectl matching the latest GKE version
- bash or bash compatible shell
- jq
The Google Cloud SDK is used to interact with your GCP resources. Installation instructions for multiple platforms are available online.
The kubectl CLI is used to interteract with both Kubernetes Engine and kubernetes in general. Installation instructions for multiple platforms are available online.
- The gke-to-gke-peering and gke-to-gke-vpn folders each contain a project.
- README files exist for the above examples; gke-to-gke-peering/README.md and gke-to-gke-vpn/README.md.
- The network folder contains the manifest files and deployment manager templates to setup networks.
- The clusters folder contains the manifest files and deployment manager templates to create Kubernetes Engine clusters.
- The manifests folder contains the manifest files to create Kubernetes Engine services.
This is not an officially supported Google product