Migrating workloads to a multi-cluster GKE environment with Multi-Cluster Services and Multi-Cluster Ingress
This tutorial demonstrates how to use Multi-Cluster Services (MCS) and Multi-Cluster Ingress (MCI) to migrate workloads from a single-cluster Google Kubernetes Engine (GKE) environment to a multi-cluster GKE environment.
For a detailed explaination, refer to the following documents:
The tutorial guides you through a migration process. During the migration process, you provision the environment with Terraform.
The scripts mentioned in this README show guidance and help when you execute them without arguments. Follow that guidance to set the right command options.
For this tutorial, you need the following tools:
- A POSIX-compliant shell.
- Google Cloud SDK (tested with version
271.0.0
). - Terraform (tested with version
v0.15.0
), if you prefer provisioning the environment with Terraform.
If you prefer using Terraform to provision the environment for the tutorial, you:
- Change your working directory to the root of this repository.
- Initialize the default Google Cloud:
gcloud auth application-default login
- Initialize Terraform:
scripts/init-terraform.sh
- Change your working directory to the
terraform
directory:cd terraform
- Ensure the configuration is valid:
terraform validate
- Apply the changes:
terraform apply
To register the Config cluster, you:
- Change your working directory to the root of this repository.
- Run:
scripts/mci-mcs.sh
To deploy an example workload in the clusters you create:
- Change your working directory to the root of this repository.
- Deploy the workloads:
scripts/workloads.sh