Study guide
9.3 Service Mesh, mTLS & Zero-Trust Service Identity
Kubernetes and Cloud Native Associate KCNA
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Introduction & Exam Overview
1.1 About the KCNA Exam & Certification Path 1.2 How to Use This Study Guide
2 Chapter 2: Kubernetes Fundamentals - Cluster Architecture & the API
2.1 Kubernetes Architecture & Control Plane Components 2.2 Worker Node Architecture & Node Components 2.3 Kubernetes API, Declarative Management & kubectl 2.4 Kubernetes Releases, API Versioning & Deprecation Policy
3 Chapter 3: Kubernetes Fundamentals - Workloads & Configuration
3.1 Core Workload Objects (Pods, Deployments & ReplicaSets) 3.2 Advanced Controllers (StatefulSets, DaemonSets, Jobs & CronJobs) 3.3 Namespaces, Labels, Selectors & Annotations 3.4 ConfigMaps, Secrets & Application Configuration 3.5 Pod & Container Lifecycle, Restart Policies & Graceful Termination
4 Chapter 4: Kubernetes Fundamentals - Scheduling & Autoscaling
4.1 Scheduling, Resource Management & Node Selection 4.2 Advanced Scheduling: Affinity, Topology Spread, Priority & Disruption Budgets 4.3 Autoscaling Workloads & Clusters (HPA, VPA, Cluster Autoscaler, KEDA)
5 Chapter 5: Kubernetes Fundamentals - Cluster Administration & Extensibility
5.1 Kubernetes Distributions, Installation Tools & Managed Services 5.2 Cluster Administration: Node Maintenance, Upgrades & etcd Backup 5.3 Extending Kubernetes: CRDs, Operators & the Controller Pattern
6 Chapter 6: Kubernetes Fundamentals - Containerization
6.1 Container Fundamentals, Runtimes & Registries 6.2 Container Image Anatomy: Layers, Tags, Digests & Pull Policy
7 Chapter 7: Container Orchestration - Networking & Service Discovery
7.1 Kubernetes Networking, Services & Ingress 7.2 Cluster DNS & Service Discovery with CoreDNS 7.3 NetworkPolicies, Zero-Trust Segmentation & the Gateway API
8 Chapter 8: Container Orchestration - Storage
8.1 Storage Concepts (PVs, PVCs, StorageClasses & CSI) 8.2 Volume Types, Snapshots & Stateful Storage Operations
9 Chapter 9: Container Orchestration - Security
9.1 Kubernetes Security & Access Control (RBAC & ServiceAccounts) 9.2 The 4C's of Cloud Native Security & Supply-Chain Trust 9.3 Service Mesh, mTLS & Zero-Trust Service Identity
10 Chapter 10: Container Orchestration - Troubleshooting
10.1 Container Troubleshooting & Health Probes 10.2 Cluster & Node-Level Troubleshooting
11 Chapter 11: Cloud Native Application Delivery
11.1 Cloud Native CI/CD Pipelines & Build Tooling 11.2 GitOps & Package Management (Helm, Kustomize, Argo CD & Flux) 11.3 Deployment Strategies & Release Management 11.4 Progressive Delivery Automation: Argo Rollouts, Flagger & Feature Flags 11.5 Application Debugging & Developer Workflows in Kubernetes 11.6 Platform Engineering & Developer Self-Service
12 Chapter 12: Cloud Native Architecture - Observability & Principles
12.1 Cloud Native Observability (Logging, Metrics & Tracing) 12.2 Cloud Native Principles & Architecture Patterns 12.3 Serverless, FaaS & Event-Driven Architecture
13 Chapter 13: Cloud Native Architecture - CNCF Ecosystem & Community
13.1 The CNCF Landscape, Governance & Project Lifecycle 13.2 Cloud Native Community, Collaboration & Contribution
9.3 Service Mesh, mTLS & Zero-Trust Service Identity
Key Takeaways Explain This Topic AI
A service mesh splits into a data plane of proxies that carry every request and a control plane that configures those proxies from the Kubernetes API.
Envoy is the CNCF graduated proxy used as the data plane by Istio and several other meshes; Linkerd is a CNCF graduated mesh with its own lightweight Rust proxy.
Automatic mutual TLS gives every workload a cryptographic identity and encrypts service-to-service traffic without changing application code.
A mesh enforces layer 7 authorization such as allowing GET on one path while denying POST on another, which standard NetworkPolicy cannot express.
Sidecar meshes add a proxy container to every Pod; ambient or node-level modes move that proxy out of the Pod to reduce per-Pod resource cost.
Last updated: August 2026
9.3 Service Mesh, mTLS & Zero-Trust Service Identity
Quick Answer: A service mesh is a dedicated infrastructure layer for service-to-service communication. Its data plane is a fleet of proxies — typically Envoy , a CNCF graduated project — that intercept every request in and out of a workload. Its control plane watches the Kubernetes API and programs those proxies. The result is automatic mutual TLS , L7 traffic control , and uniform telemetry , all without touching application code. "Service mesh" is named explicitly in the CNCF cloud native definition, so KCNA expects you to know what it is and what problem it solves.
1. The Problem a Mesh Solves
Once a monolith becomes forty microservices, every service needs the same non-business capabilities: retries with backoff, timeouts, circuit breaking, mTLS, request tracing, and per-route authorisation. Implementing those in each service means:
- writing them once per language (Go, Java, Python, Node),
- upgrading them in lockstep across forty repositories,
and accepting that the behaviour will drift anyway.
A mesh moves that logic out of the application and into the platform . The application makes a plain HTTP call to payments ; the proxy beside it handles TLS, retries, timeouts, load balancing, and telemetry.
- 2. Data Plane and Control Plane ┌─────────────────── CONTROL PLANE ───────────────────┐
- │ watches the Kubernetes API (Services, Endpoints, │
- │ routing CRDs, policies) and issues workload │
- │ certificates; pushes config to every proxy │
- └──────────────┬──────────────────────┬────────────────┘
- │ config + certs │
- ┌─────────▼─────────┐ ┌─────────▼─────────┐
- │ Pod: orders │ │ Pod: payments │
- │ ┌──────┐ ┌──────┐ │ │ ┌──────┐ ┌──────┐ │
- │ │ app │─│proxy │─┼──┼─│proxy │─│ app │ │
- │ └──────┘ └──────┘ │ │ └──────┘ └──────┘ │
- └───────────────────┘ └───────────────────┘
- └────── mTLS on the wire ──────┘
Plane Job Examples
Data plane Carries every byte of application traffic; applies routing, retries, timeouts, mTLS, and emits metrics/traces Envoy (CNCF graduated), linkerd2-proxy (Rust)
Control plane Translates intent into proxy configuration; acts as a certificate authority Istio istiod , Linkerd control plane, Consul, Kuma
The application container is unaware any of it exists. Injection is done by a mutating admission webhook — the mechanism from section 5.3 — which appends the proxy container to the Pod spec at creation time.
3. Mutual TLS and Workload Identity
The headline security feature. In a plain cluster, Pod-to-Pod traffic is unencrypted and a receiving service has no cryptographic proof of who is calling — it sees only an IP address that may belong to a different workload a minute later.
A mesh gives every workload a short-lived X.509 certificate whose identity is derived from its ServiceAccount , and both proxies present certificates on every connection:
Encryption in transit for all service-to-service traffic, automatically.
Authentication of both ends — the caller is cryptographically identified, not merely IP-inferred.
Automatic rotation , typically every 24 hours or less, with no application involvement.
Identity-based authorization — policies reference serviceAccount: orders , not a CIDR.
This is what "zero trust" means concretely: the network is assumed hostile, and every request is authenticated and authorised regardless of where it originated. SPIFFE/SPIRE is the CNCF project that standardises this workload-identity format, and meshes commonly emit SPIFFE-compatible identities.
Enforcement modes usually run PERMISSIVE first — accepting both plaintext and mTLS during migration — before switching to STRICT .
4. Layer 7 Traffic Control
Because the proxy parses HTTP and gRPC, it can act on request semantics that layer 3/4 controls cannot see:
- Capability Example
- Weighted traffic splitting 95% to v1 , 5% to v2 — canary independent of replica counts
- Header/identity routing Send requests with x-beta: true to v2
- Retries and timeouts Retry idempotent calls twice with a 2-second per-attempt timeout
- Circuit breaking / outlier detection Eject an endpoint returning consecutive 5xx responses
- Fault injection Deliberately inject 500s or 3-second delays to test resilience
- L7 authorization Allow GET /api/orders from serviceAccount: web , deny POST /api/admin from everything
That last row is the crisp distinction from section 7.3: NetworkPolicy operates at L3/L4 and can only allow or deny a port. Method- and path-level authorisation requires a mesh (or a CNI-specific L7 policy such as CiliumNetworkPolicy ).
5. Observability for Free
Because every request crosses a proxy, the mesh emits golden signals — request rate, error rate, latency distribution, and saturation — for every service pair, without instrumenting anything. It also propagates trace headers automatically, so a distributed trace shows the full call graph as long as applications forward the incoming headers.
The honest caveat: the mesh can propagate context but cannot create spans inside your application. Meaningful traces still require application-level instrumentation, typically with OpenTelemetry.
6. Sidecar vs Ambient
Model How it works Trade-off
Sidecar One proxy container in every Pod Strongest isolation and full L7 features per workload; costs CPU and memory per Pod and adds a container to every restart and upgrade
Ambient / node-level A shared per-node proxy handles L4 and mTLS; an optional per-namespace L7 proxy is added only where needed Much lower overhead and no Pod restarts to enrol; weaker per-Pod isolation
eBPF / sidecarless Kernel-level dataplane (Cilium) performs L4 and identity in the kernel Lowest overhead; L7 features vary by implementation
Sidecar meshes also historically suffered a lifecycle problem — the proxy could start after the app or die before it finished draining. The restartable sidecar container from section 3.5 (an initContainers entry with restartPolicy: Always ) is the Kubernetes-native fix.
7. The Main Implementations
- Project CNCF status Character
- Istio Graduated The most feature-complete; Envoy data plane; supports sidecar and ambient modes
Linkerd Graduated Deliberately minimal; purpose-built Rust micro-proxy; prized for low overhead and simple operation
- Cilium Service Mesh Graduated (Cilium) eBPF-based, sidecarless; merges CNI and mesh
- Consul HashiCorp Multi-platform, extends beyond Kubernetes to VMs
- Kuma Sandbox Envoy-based, multi-zone and multi-cluster focus
Do you need one? A mesh is real operational weight: another control plane, another certificate authority, another upgrade cycle, and a new class of failure. For a handful of services, application libraries and NetworkPolicy are usually enough. The mesh earns its cost at scale, under a compliance requirement for encryption in transit, or when progressive delivery needs precise traffic control.