solutions-istio-mesh-expansion-migration

Istio Mesh Expansion for migrations

APACHE-2.0 License

Stars
7

Supporting Your Migration with Istio

This solution tutorial demonstrates how to use a service mesh, Istio to gradually migrate services from a "legacy" environment to a modern, cloud-native one.

Please refer to the following articles for the steps to run the code:

Dependencies

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.

Contents of this repository

Terraform descriptors

The terraform directory contains all the Terraform descriptors to provision the resources for the tutorial.

Example Workload

The Bookinfo app is used as a test workload to gradually migrate to Kubernetes.

It's available for two different deployment methods:

Service Mesh Routing Rules

The kubernetes/bookinfo/istio directory contains:

  • An Istio Gateway to expose services
  • Istio ServiceEntries to register services running with Docker Compose to the mesh
  • Various VirtualServices to configure routing either to instances running with Docker Compose (-vm suffix), to Kubernetes (-gke suffix) or to both (-split suffix)

Additional Services

  • A Service to expose KubeDNS so workloads not running in Kubernetes can resolve internal names
  • An Istio Gateway and VirtualService to expose Kiali (used to visualize the service mesh)

Provisioning the environment with Terraform

If you prefer using Terraform to provision the environment for the tutorial, you:

  1. Change your working directory to the root of this repository.
  2. Initialize the default Google Cloud: gcloud auth application-default login
  3. Initialize Terraform: scripts/init.sh
  4. Change your working directory to the terraform directory: cd terraform
  5. Ensure the configuration is valid: terraform validate
  6. Apply the changes: terraform apply

Deploying workloads

To deploy an example workload in the clusters you create:

  1. Change your working directory to the root of this repository.
  2. Deploy the workloads: scripts/workloads.sh
Related Projects