Skip to content

Lesson 07 — Service Mesh & mTLS

By the end of this lesson, you will be able to:

  • Understand what a Service Mesh is
  • Learn why traditional Kubernetes networking is not enough
  • Understand sidecar proxies
  • Learn how Envoy Proxy works
  • Understand Mutual TLS (mTLS)
  • Explore Istio and Linkerd
  • Learn Zero Trust service-to-service communication
  • Apply enterprise Service Mesh security best practices

Modern cloud-native applications consist of hundreds—or even thousands—of microservices.

Example:

Frontend
API Gateway
User Service
Payment Service
Order Service
Inventory Service
Notification Service

Every service continuously communicates with multiple other services.

Without additional security controls:

  • Traffic may be unencrypted.
  • Service identities cannot be verified.
  • Attackers can impersonate services.
  • Lateral movement becomes easier.
  • Monitoring is limited.

A Service Mesh solves these challenges by securing communication between services without requiring application code changes.


A Service Mesh is a dedicated infrastructure layer that manages and secures communication between microservices.

It provides:

  • Secure service-to-service communication
  • Automatic encryption
  • Authentication
  • Authorisation
  • Traffic management
  • Observability
  • Policy enforcement

The application focuses on business logic while the Service Mesh manages networking and security.


Without a Service Mesh:

Frontend
API
Database

Applications communicate directly.

Each application must implement:

  • TLS
  • Authentication
  • Retry logic
  • Logging
  • Metrics
  • Encryption

This increases development complexity and often results in inconsistent security.


Frontend
Envoy Proxy
Envoy Proxy
API
Envoy Proxy
Database

Every connection passes through a secure proxy.

Applications no longer need to implement networking security themselves.


A Service Mesh typically consists of:

  • Sidecar Proxy
  • Control Plane
  • Data Plane
  • Certificate Authority
  • Policy Engine
  • Telemetry Components

Together these components secure and manage all service communication.


Component Purpose
Control Plane Manages policies, certificates and configuration
Data Plane Processes application traffic using sidecar proxies

Architecture:

Control Plane
Configuration
Sidecar Proxies
Application Traffic

A Sidecar Proxy is a lightweight proxy container deployed alongside every application container.

Example:

Pod
├── Application Container
└── Envoy Sidecar

Every request entering or leaving the Pod passes through the sidecar.


Application
Envoy Sidecar
Network
Envoy Sidecar
Destination Application

Applications never communicate directly.

This enables centralised security enforcement.


The most widely used Service Mesh proxy is Envoy.

Capabilities include:

  • Layer 7 proxy
  • TLS termination
  • Mutual TLS
  • Authentication
  • Traffic routing
  • Retries
  • Circuit breaking
  • Metrics
  • Logging
  • Distributed tracing

Envoy is the data plane for Istio and several other Service Mesh implementations.


Traditional TLS encrypts communication between a client and a server.

Example:

Client
HTTPS
Server

The client verifies the server’s identity.


With Mutual TLS, both sides authenticate each other.

Service A
Certificate Validation
Encrypted Connection
Certificate Validation
Service B

Both services must present valid certificates before communication is allowed.


TLS Mutual TLS
Server authenticated Both client and server authenticated
Encryption Encryption
One-way identity verification Two-way identity verification
Common for websites Common for microservices

mTLS provides stronger identity verification for internal communications.


One major advantage of a Service Mesh is automatic certificate management.

Certificate Authority
Issue Certificates
Service A
Service B

Certificates are:

  • Automatically issued
  • Rotated
  • Renewed
  • Revoked

Developers do not need to manage certificates manually.


Service Mesh implements Zero Trust networking.

Instead of:

Internal Network
Trusted

The model becomes:

Request
Authenticate
Authorise
Encrypt
Allow

Every request is verified regardless of its origin.


Instead of trusting IP addresses:

10.0.12.45

Service Mesh trusts identities.

Example:

payment-service
Authenticated Identity
order-service

This is far more resilient because Pod IP addresses change frequently.


Istio is the most widely adopted enterprise Service Mesh.

Key capabilities include:

  • Mutual TLS
  • Traffic management
  • Security policies
  • Authorization Policies
  • Observability
  • Distributed tracing
  • Canary deployments
  • Fault injection
  • Certificate management

Istio is commonly deployed in enterprise Amazon EKS environments.


Linkerd is a lightweight Service Mesh.

Features include:

  • Simpler deployment
  • Lower resource usage
  • Automatic mTLS
  • Observability
  • Reliability

Many organisations choose Linkerd when they require a lightweight alternative to Istio.


Typical architecture:

Internet
Application Load Balancer
Ingress Controller
Amazon EKS
Istio Control Plane
Envoy Sidecars
Application Pods

The Service Mesh secures communication inside the Kubernetes cluster.


Customer
AWS WAF
Application Load Balancer
Ingress Controller
Frontend
Envoy
API
Envoy
Payment
Envoy
Database

Every internal connection is authenticated and encrypted.


A global financial institution operates over 400 microservices on Amazon EKS.

Requirements include:

  • PCI DSS compliance
  • Zero Trust networking
  • Automatic certificate rotation
  • Full service visibility
  • Identity-based communication

The organisation deploys Istio with:

  • Automatic mTLS
  • Authorization Policies
  • Envoy sidecars
  • AWS Certificate integration
  • Amazon CloudWatch monitoring

Benefits include:

  • Encrypted internal communication
  • Verified workload identities
  • Simplified certificate management
  • Improved compliance
  • Centralised traffic policies

Cloud Security Engineers frequently identify:

  • Disabled mTLS
  • Plaintext service communication
  • Outdated certificates
  • Misconfigured Authorization Policies
  • Unencrypted east-west traffic
  • Excessive service permissions
  • Missing telemetry
  • Sidecar injection failures
  • Expired certificates
  • Unmanaged Service Mesh upgrades

These weaknesses reduce the effectiveness of the Service Mesh and increase the attack surface.


Security teams should monitor:

  • Certificate expiry
  • mTLS status
  • Sidecar health
  • Failed authentication attempts
  • Authorization Policy violations
  • Service latency
  • Traffic volume
  • Retry rates
  • Circuit breaker events
  • Service identity changes

Observability tools such as Amazon CloudWatch, Prometheus, Grafana, Jaeger and Kiali provide valuable insights into Service Mesh health and traffic.


A recommended enterprise approach:

Step 1
Deploy Istio
Step 2
Enable Automatic Sidecar Injection
Step 3
Enable Mutual TLS
Step 4
Apply Authorization Policies
Step 5
Enable Observability
Step 6
Monitor Certificates
Step 7
Review Security Policies

This layered approach strengthens internal communication and aligns with Zero Trust networking principles.


As a Kubernetes Security Engineer:

  • Enable Mutual TLS for all service-to-service communication.
  • Use identity-based communication instead of relying on IP addresses.
  • Enable automatic certificate rotation.
  • Deploy sidecar proxies consistently across workloads.
  • Enforce least-privilege Authorization Policies.
  • Monitor certificate lifecycle and renewal events.
  • Enable distributed tracing and service telemetry.
  • Keep Istio, Linkerd and Envoy updated.
  • Audit Service Mesh configuration regularly.
  • Integrate Service Mesh monitoring with CloudWatch and Security Hub.

A well-configured Service Mesh significantly improves security, resilience and observability across Kubernetes environments.


A retail organisation deploys over 250 microservices on Amazon EKS.

An attacker compromises one application and attempts to impersonate the payment service to capture customer payment requests.

However, the Service Mesh enforces:

  • Automatic Mutual TLS
  • Service identity verification
  • Authorization Policies
  • Certificate validation
  • Continuous telemetry

The attacker cannot establish a trusted connection because the compromised workload lacks a valid service identity.

Security teams detect the failed authentication attempts through Service Mesh telemetry and investigate the incident before customer data is exposed.


After completing this lesson, you should understand:

  • What a Service Mesh is
  • How sidecar proxies secure traffic
  • The role of Envoy Proxy
  • The difference between TLS and Mutual TLS
  • How Istio and Linkerd implement Service Mesh
  • Automatic certificate management
  • Identity-based networking
  • Zero Trust communication
  • Enterprise Service Mesh best practices

A Service Mesh provides secure, observable and policy-driven communication between microservices. By combining automatic Mutual TLS, service identities, sidecar proxies and Zero Trust principles, organisations can significantly strengthen the security posture of Amazon EKS environments while simplifying application development.


What is the primary purpose of a Service Mesh?

  • A. Store Kubernetes Secrets
  • B. Secure and manage service-to-service communication
  • C. Schedule Pods
  • D. Allocate Pod IP addresses

Answer: B


What is the role of a sidecar proxy?

  • A. Replace Kubernetes Services
  • B. Secure and manage all inbound and outbound traffic for an application
  • C. Store application logs
  • D. Manage persistent storage

Answer: B


What is the key difference between TLS and Mutual TLS (mTLS)?

  • A. TLS encrypts traffic, while mTLS does not.
  • B. TLS authenticates only the server, while mTLS authenticates both the client and the server.
  • C. mTLS works only on Amazon EKS.
  • D. TLS requires Kubernetes Network Policies.

Answer: B


Which Service Mesh is most commonly deployed in enterprise Kubernetes environments?

  • A. kube-proxy
  • B. Istio
  • C. CoreDNS
  • D. Flannel

Answer: B


Which of the following is considered an enterprise Service Mesh best practice?

  • A. Disable certificate rotation.
  • B. Allow plaintext service-to-service communication.
  • C. Enable Mutual TLS, enforce authorization policies and monitor Service Mesh telemetry.
  • D. Trust all internal network traffic without verification.

Answer: C


In the next lesson, you will learn about East-West Traffic Protection, exploring how enterprise organisations secure internal Kubernetes communication, prevent lateral movement, implement micro-segmentation and monitor east-west traffic across Amazon EKS clusters.

➡️ Next Lesson: Lesson 08 — East-West Traffic Protection