4 min read
Multi-Region Cloud Training
Hands-on lab notes for practicing multi-region Kubernetes, GitOps, Istio cross-cluster routing, progressive delivery, chaos testing, and load testing without paying for two cloud regions.
Assumptions and Constraints
- Cost boundary: this series mocks “multi-region” with two Kubernetes clusters (for example,
kindork3d), not two AWS regions. - You have two kube contexts reachable from your workstation:
prod-us-east-1andprod-eu-west-1. - You control a container registry and a GitHub repository.
- Part 4 (AWS IAM) is optional if you are running local clusters.
Labs
- Part 1: Baseline Repo and Environments
Sets shared variables and
taskwrappers. Confirms cluster contexts and versions. - Part 2: GitOps with Argo CD
Installs Argo CD, registers both clusters with region labels, and deploys across them with an
ApplicationSet. - Part 3: Istio Multi-Region Mesh
Installs Istio across two networks with east-west gateways, mTLS routing, and
ServiceEntrywiring. - Part 4: AWS Identity (IRSA vs Pod Identity) Grants pods temporary AWS credentials with IRSA or EKS Pod Identity, with the tradeoffs for each.
- Part 5: Sample App and Overlays Deploys a small Go HTTP service with region-specific Kustomize overlays.
- Part 6: CI with GitHub Actions and Taskfile
Builds and pushes images in CI using the same
taskcommands you run locally, then updates the Kustomize image tag. - Part 7: CD with Istio Traffic Policy
Adds connection pools, outlier detection, and weighted traffic splits across
v1andv2. - Part 7.1: Progressive Delivery with Argo Rollouts
Replaces the
Deploymentwith an ArgoRolloutfor automated canary steps, header-based routing, and Prometheus analysis. - Part 8: Chaos Testing Schedules recurring pod kills and injects network latency with Chaos Mesh.
- Part 9: Load Generation and SLOs Runs k6 inside the cluster with SLO thresholds to compare in-cluster and cross-cluster p95 and p99 latency.
How to Use
- Configure two kube contexts (
prod-us-east-1andprod-eu-west-1). Localkindork3dclusters keep spend near zero. - Start at Part 1 and work in order. Parts 5 through 7 build a
Deployment-based app underdeploy/overlays/; Part 7.1 migrates it todeploy/rollouts/for Argo Rollouts. - In Part 4, pick one AWS identity path if you are on AWS. IRSA works on EKS, Fargate, and clusters with an OIDC provider. EKS Pod Identity is EKS-only and requires Linux EC2 nodes.
Architecture
[Dev Laptop]
| task, kubectl, helm
v
[GitHub Repo] -----> [GitHub Actions CI] ---> [Registry (GHCR/ECR)]
| | |
| manifests | pushes image |
v v v
[GitOps Manifests (deploy/*)]
|
v
[Argo CD (control)]
/ \
v v
+-----------------------+ +-----------------------+
| Cluster: US | | Cluster: EU |
| ns echo | | ns echo |
| istiod | | istiod |
| east-west gateway |<====>| east-west gateway |
| echo (sidecar) | mTLS | echo (sidecar) |
| VS/DR (pool/outlier) | | VS/DR (pool/outlier) |
| Chaos Mesh + k6 | | Chaos Mesh + k6 |
+-----------------------+ +-----------------------+
Identity per pod (optional, AWS):
[Pod + SA aws-sa]
| IRSA: OIDC token -> STS AssumeRoleWithWebIdentity -> creds
| Pod Identity: EKS agent -> EKS Auth AssumeRoleForPodIdentity -> STS -> creds
v
[AWS APIs]
Notes: multi-network meshID=training-mesh, trustDomain=corp.local;
cross-cluster routing via east-west gateway, Gateway/VirtualService, and ServiceEntry.Verification
By the end of Part 9, you can sync region-specific manifests to two clusters, roll out an image with automated canary checks, inject pod kills and latency, and measure local versus cross-cluster latency against k6 thresholds.
Taskfile Targets in This Repo
task k:verprints client and server versions for both contexts.task istio:install:allinstallsistio-baseandistiodin both clusters.task istio:gw:allinstalls the east-west gateway in both clusters on port15443.task argocd:install:allinstalls Argo CD in both clusters.task obs:install:allinstallskube-prometheus-stack, an EnvoyPodMonitor, and Kiali in both clusters.task rollouts:install:allinstalls the Argo Rollouts controller in both clusters.task rollouts:apply:allapplies the Rollouts overlays directly to both clusters.task chaos:install:allinstalls Chaos Mesh in both clusters.