Skip to main content

Overview

Anthos Service Mesh (managed Istio) provides secure service-to-service communication, advanced traffic management, and deep observability for microservices on GKE. Fully managed by Google with automatic upgrades.

Mutual TLS

Automatic encryption between services

Traffic Control

Canary deployments, A/B testing, circuit breaking

Observability

Service topology, latency, error rates

Policy Enforcement

Fine-grained authorization, rate limiting

Why Service Mesh?

Challenge: By default, pods can talk to any other podSolution: Service mesh enforces mTLS + authorization policiesImplementation:
Result: Encrypted, authenticated communication
Use cases:
  • Canary releases (10% traffic to v2)
  • A/B testing (iOS users → v2)
  • Blue-green deployments
  • Circuit breaking (prevent cascading failures)
Without mesh: Complex custom codeWith mesh: Declarative traffic rules
Built-in metrics:
  • Request rate (QPS per service)
  • P50/P95/P99 latency
  • Success rate (% 2xx responses)
  • Service dependency graph
Without mesh: Instrumentation code in every serviceWith mesh: Automatic sidecar collection
Scenario: Services across dev, staging, prod clustersCapability: Single mesh spanning clustersBenefit: Consistent policies, cross-cluster service discovery

Architecture

Components:
  • Istiod: Control plane (managed by Google, auto-upgraded)
  • Envoy sidecars: Injected into each pod, handle traffic
  • Telemetry: Metrics sent to Cloud Monitoring

Quick Setup (30 minutes)

1

Enable APIs & Fleet Registration

What it does:
  • Enables Anthos Service Mesh APIs
  • Registers cluster with GKE Fleet
  • Enables managed service mesh
  • Waits for control plane (~10-15 min)
2

Verify Installation

istiod pod should be Running
3

Enable Sidecar Injection

4

Verify Sidecars Injected

5

Enable Strict mTLS

All traffic now encrypted with mTLS!
6

Verify mTLS


Traffic Management

Canary Deployment

Deploy new version to 10% of traffic:
Workflow:
  1. Deploy v2 with label version: v2
  2. Apply VirtualService (10% → v2)
  3. Monitor metrics for 30 minutes
  4. If healthy, increase to 50%, then 100%
  5. If unhealthy, revert to 0%

Circuit Breaking

Prevent cascading failures:
Behavior: After 5 consecutive errors, eject pod for 30 seconds

Retry Policy


Security

Strict mTLS

Applies to all namespaces.

Authorization Policies

Deny-all by default:
Allow specific service:
Result: Only mcp-server SA can call postgres-proxy

Observability

Service Topology

View in Google Cloud Console:
Shows:
  • Service dependency graph
  • Traffic flow between services
  • Error rates per edge

Metrics

Dashboards

Import pre-built dashboards:
Features:
  • Service graph visualization
  • Traffic animation
  • Configuration validation
  • Distributed tracing

Multi-Cluster Mesh

1

Register All Clusters

2

Enable Mesh for All

3

Configure Cross-Cluster Service Discovery

Use case: Production can call staging services for integration testing

Troubleshooting

Symptom: Pod has 1/1 containers (should be 2/2)Checks:
Solution: Label namespace and restart pods
Symptom: Service A can’t connect to Service BChecks:
Common fix: Ensure both sides have sidecars injected
Symptom: Mesh status shows PROVISIONING for >20 minutesSolution:

Best Practices

Start with PERMISSIVE mTLS, then move to STRICT
Use namespace-scoped policies for isolation
Enable resource limits on sidecars
Monitor mesh health with SLIs

GKE Production

Deploy with service mesh enabled

Security Hardening

mTLS as part of 67-control framework

Operations Runbooks

Service mesh troubleshooting

Monitoring

Service mesh metrics and alerting

Next Steps

1

Install Anthos Service Mesh

2

Enable Sidecar Injection

3

Enable Strict mTLS

4

Configure Traffic Rules

Set up canary deployments, circuit breaking, retries
5

Monitor Service Topology

Console → Anthos → Service Mesh → Topology