CareerByteCode
ByteBlogby CareerByteCode

Linkerd vs Istio: Lightweight Service Mesh Hands-On

What you build: Istio and Linkerd on one GKE cluster, the same app and load measured side by side, and a plain-text caller test. Every step tested.

Linkerd vs Istio: Lightweight Service Mesh Hands-On

✍️ Translate this blog into Hindi, Tamil or Telugu

"Should we use Istio or Linkerd?" is one of the most common platform questions, and most comparisons repeat marketing tables. In this lab we install both on the same GKE cluster, run the same app under the same load in three namespaces (no mesh, Istio, Linkerd), and measure what each costs: added latency, sidecar CPU and memory, and control plane size. Then we test the security default that matters most: what happens when a pod outside the mesh calls a meshed service in plain text.

Who it is for: Kubernetes users who know what a service mesh is (if not, read Istio Service Mesh for Beginners on Kubernetes first). Time: about 1 hour. Cost: a small GKE cluster for about 10 minutes, covered by the free trial credit. Delete it at the end.

Every command below was run for real by the CareerByteCode Team, and every output is the real result we got. We typed the commands in a Cloud Shell-like Linux VM (Debian with gcloud, kubectl and curl); Cloud Shell in your browser has the same tools.

🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโ‚น499Build the projects →

Part A: two meshes in plain English

Both meshes put a small proxy next to every app container (a sidecar). All traffic in and out of the pod goes through it, so the mesh can encrypt it (mTLS), measure it, retry it and apply rules, without changing the app.

The test setup
The same app and load generator in three namespaces: no mesh, Istio with Envoy sidecars, Linkerd with linkerd2-proxy sidecars

The difference is in the parts:

  • Istio uses Envoy as its proxy: a big, general proxy written in C++ with a huge feature set. The control plane is istiod.
  • Linkerd uses linkerd2-proxy: a small proxy written in Rust only for the service mesh job. The control plane has three small deployments.
  • mTLS (mutual TLS): both sides of a connection prove who they are with certificates, and traffic is encrypted. Both meshes do this automatically between meshed pods.
  • fortio: a load testing tool. We send 100 requests a second for 30 seconds and read the 50th and 99th percentile latency.
  • Real-life example: a sidecar is a personal assistant who handles all of a manager's phone calls. Istio's assistant speaks every language and knows every form; Linkerd's assistant does fewer things but is quicker and eats less.

Before you start

  1. A Google Cloud project with billing linked (the free trial works) and Cloud Shell open.
  2. One small GKE cluster. We created it once for this batch of Kubernetes labs:
gcloud container clusters create lab-cluster \
  --zone=us-east1-b --num-nodes=2 --machine-type=e2-standard-4 \
  --disk-type=pd-standard --disk-size=50 --release-channel=regular \
  --no-enable-autoupgrade --enable-dataplane-v2

Part B: the lab

Step 1: the baseline, with no mesh

Why: you cannot judge a mesh's cost without knowing the cost of nothing. The app is a tiny echo server (2 replicas) and a fortio pod that sends the load. Save this as app.yaml:

# The same small app for every namespace: an echo server (2 replicas) and a fortio load generator (1 pod)
apiVersion: apps/v1
kind: Deployment
metadata: {name: echo}
spec:
  replicas: 2
  selector: {matchLabels: {app: echo}}
  template:
    metadata: {labels: {app: echo}}
    spec:
      containers:
      - {name: echo, image: hashicorp/http-echo:1.0, args: ["-text=ok", "-listen=:5678"], ports: [{containerPort: 5678}], resources: {requests: {cpu: 20m, memory: 16Mi}}}
---
apiVersion: v1
kind: Service
metadata: {name: echo}
spec: {selector: {app: echo}, ports: [{name: http, port: 80, targetPort: 5678}]}
---
apiVersion: apps/v1
kind: Deployment
metadata: {name: load}
spec:
  replicas: 1
  selector: {matchLabels: {app: load}}
  template:
    metadata: {labels: {app: load}}
    spec:
      containers:
      - {name: fortio, image: fortio/fortio:1.60.3, args: ["server"], resources: {requests: {cpu: 50m, memory: 32Mi}}}

measure.sh runs the same test in any namespace and adds up the sidecar CPU and memory. Save it as measure.sh:

#!/bin/bash
# measure.sh <namespace>: 30 seconds of load at 100 requests/s from fortio to the echo service, then latency and sidecar cost
NS=$1
kubectl -n $NS exec deploy/load -c fortio -- fortio load -qps 100 -c 4 -t 30s -quiet http://echo/ 2>&1 \
  | grep -E "^# target 50%|^# target 99%|All done|Code 200" | sed -E 's/^# target ([0-9]+)% ([0-9.]+)/p\1 \2 s/'
kubectl top pods -n $NS --containers --no-headers 2>/dev/null | awk -v ns=$NS '$2 ~ /proxy/ {c += $3; m += $4; n++} END {if (n) printf "%s: %d proxies, %dm cpu, %dMi memory in total\n", ns, n, c, m; else print ns ": no proxies"}'
# Baseline: the app with NO mesh, measured first
gcloud container clusters get-credentials lab-cluster --zone=us-east1-b > /dev/null 2>&1
kubectl create namespace plain > /dev/null && kubectl -n plain apply -f app.yaml > /dev/null && kubectl -n plain rollout status deploy/echo deploy/load --timeout=180s > /dev/null && echo "app running without a mesh"
chmod +x measure.sh && sleep 20 && ./measure.sh plain
app running without a mesh
p50 0.000704511 s
p99 0.00198974 s
Code 200 : 3000 (100.0 %)
All done 3000 calls (plus 4 warmup) 0.779 ms avg, 100.0 qps
plain: no proxies

Without a mesh: median 0.70 ms, p99 1.99 ms.

Step 2: install Istio and mesh the app

Why: the minimal profile installs only istiod (no ingress gateway), which keeps the comparison fair. The namespace label istio-injection=enabled makes Istio add an Envoy sidecar to every new pod. READY 2/2 means each pod has the app plus its sidecar.

# Install Istio (minimal profile: the istiod control plane only) and run the same app with Envoy sidecars
curl -sL https://istio.io/downloadIstio | ISTIO_VERSION=1.24.2 sh - > /dev/null 2>&1 && sudo cp istio-1.24.2/bin/istioctl /usr/local/bin/ && istioctl version --remote=false
istioctl install --set profile=minimal -y 2>&1 | grep -E "Installation complete|โœ”" | head -2
kubectl create namespace mesh-istio > /dev/null && kubectl label namespace mesh-istio istio-injection=enabled > /dev/null
kubectl -n mesh-istio apply -f app.yaml > /dev/null && kubectl -n mesh-istio rollout status deploy/echo deploy/load --timeout=180s > /dev/null
kubectl -n mesh-istio get pods --no-headers | awk '{print $1, "READY", $2}' | sed -E 's/-[a-z0-9]+-[a-z0-9]{5} / /'
client version: 1.24.2
โœ” Istio core installed โ›ต๏ธ
โœ” Istiod installed ๐Ÿง 
echo READY 2/2
echo READY 2/2
load READY 2/2

Step 3: install Linkerd and mesh the app

Why: Linkerd needs the Kubernetes Gateway API types first, then its own types (CRDs), then the control plane. The annotation linkerd.io/inject=enabled adds a linkerd2-proxy sidecar to every new pod.

# Install Linkerd (Gateway API CRDs, then Linkerd's CRDs and control plane) and run the same app with linkerd2-proxy sidecars
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml > /dev/null 2>&1 && echo "gateway API CRDs installed"
curl -sL https://run.linkerd.io/install-edge | sh > /dev/null 2>&1; export PATH=$HOME/.linkerd2/bin:$PATH; linkerd version --client --short
linkerd install --crds | kubectl apply -f - > /dev/null && linkerd install | kubectl apply -f - > /dev/null && linkerd check --wait 5m 2>&1 | grep -E "Status check results|โˆš control plane pods are ready" | head -2
kubectl create namespace mesh-linkerd > /dev/null && kubectl annotate namespace mesh-linkerd linkerd.io/inject=enabled > /dev/null
kubectl -n mesh-linkerd apply -f app.yaml > /dev/null && kubectl -n mesh-linkerd rollout status deploy/echo deploy/load --timeout=180s > /dev/null
kubectl -n mesh-linkerd get pods --no-headers | awk '{print $1, "READY", $2}' | sed -E 's/-[a-z0-9]+-[a-z0-9]{5} / /'
gateway API CRDs installed
edge-26.11.2
Rendering Linkerd CRDs...
Next, run `linkerd install | kubectl apply -f -` to install the control plane.

โˆš control plane pods are ready
Status check results are ร—
echo READY 2/2
echo READY 2/2
load READY 2/2

The control plane pods were ready. linkerd check also reported at least one failed check (the ร— line). We filtered its output to two lines, so we do not show which check it was; the mesh worked in every test below.

Both meshes installed
The baseline without a mesh, Istio with Envoy sidecars, Linkerd with its own proxy: every pod READY 2/2

Step 4: measure both, the same way

# Measure both meshes the same way: latency at 100 requests/s, sidecar cost, control plane cost
sleep 30; ./measure.sh mesh-istio; ./measure.sh mesh-linkerd
kubectl top pods -n istio-system --no-headers | awk '{c += $2; m += $3; n++} END {printf "istio control plane: %d pods, %dm cpu, %dMi memory\n", n, c, m}'
kubectl top pods -n linkerd --no-headers | awk '{c += $2; m += $3; n++} END {printf "linkerd control plane: %d pods, %dm cpu, %dMi memory\n", n, c, m}'
p50 0.00347738 s
p99 0.0056 s
Code 200 : 3000 (100.0 %)
All done 3000 calls (plus 4 warmup) 3.525 ms avg, 100.0 qps
mesh-istio: 3 proxies, 51m cpu, 112Mi memory in total
p50 0.0026083 s
p99 0.00517647 s
Code 200 : 3000 (100.0 %)
All done 3000 calls (plus 4 warmup) 2.702 ms avg, 100.0 qps
mesh-linkerd: 3 proxies, 6m cpu, 7Mi memory in total
istio control plane: 1 pods, 3m cpu, 55Mi memory
linkerd control plane: 3 pods, 7m cpu, 76Mi memory

What we measured, side by side:

At 100 requests a secondNo meshIstioLinkerd
Median latency (p50)0.70 ms3.48 ms2.61 ms
p99 latency1.99 ms5.60 ms5.18 ms
Sidecars (3 pods) CPUnone51m6m
Sidecars (3 pods) memorynone112 MiB7 MiB
Control planenone1 pod, 3m CPU, 55 MiB3 pods, 7m CPU, 76 MiB

Both meshes added a few milliseconds, because every request now passes through two proxies (the caller's and the receiver's). In our run Linkerd added a little less latency, and its sidecars used much less CPU and memory. Istio's control plane was a single, slightly smaller deployment. These numbers come from one short test on a small cluster (kubectl top takes a snapshot), so treat them as a direction, not a benchmark.

Break it: a caller outside the mesh

A pod in the plain namespace (no sidecar, so no certificate) calls each mesh's service. For Istio we first turn on STRICT mTLS for its namespace with a PeerAuthentication:

# Break it: a pod OUTSIDE the mesh calls each mesh's service. Who stops plain-text traffic?
kubectl apply -n mesh-istio -f - > /dev/null <<'Y'
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata: {name: default}
spec: {mtls: {mode: STRICT}}
Y
sleep 10
R=$(kubectl -n plain exec deploy/load -c fortio -- fortio curl -quiet http://echo.mesh-istio/ 2>&1); echo "outsider -> istio echo: $(echo "$R" | grep -m1 -oE 'HTTP/1.1 [0-9]+' || echo "$R" | tail -1 | cut -c1-120)"
R=$(kubectl -n plain exec deploy/load -c fortio -- fortio curl -quiet http://echo.mesh-linkerd/ 2>&1); echo "outsider -> linkerd echo: $(echo "$R" | grep -m1 -oE 'HTTP/1.1 [0-9]+' || echo "$R" | tail -1 | cut -c1-120)"
outsider -> istio echo: command terminated with exit code 1
outsider -> linkerd echo: HTTP/1.1 200

Istio refused the plain-text call (the request failed, so fortio ended with exit code 1). Linkerd answered with 200: by default, Linkerd encrypts traffic between meshed pods but still accepts plain-text callers from outside the mesh. Many teams assume "we have a mesh, so everything is mTLS only". This test shows that is not true for Linkerd's default.

📝⭐ Recommended by CareerByteCode · Certification examCIPS Level 5 Advanced Diploma in Procurement and Supply PracticeTake the examTake the exam →

Fix it: Linkerd's default inbound policy

Linkerd's answer is its default inbound policy. Setting all-authenticated on the namespace (and restarting the pods so their proxies read it) allows only callers with a mesh identity:

# Fix it for Linkerd: only meshed (authenticated) callers may connect to pods in the namespace
kubectl annotate namespace mesh-linkerd config.linkerd.io/default-inbound-policy=all-authenticated --overwrite > /dev/null
kubectl -n mesh-linkerd rollout restart deploy/echo > /dev/null && kubectl -n mesh-linkerd rollout status deploy/echo --timeout=180s > /dev/null && sleep 10
R=$(kubectl -n plain exec deploy/load -c fortio -- fortio curl -quiet http://echo.mesh-linkerd/ 2>&1); echo "outsider -> linkerd echo: $(echo "$R" | grep -m1 -oE 'HTTP/1.1 [0-9]+' || echo "$R" | tail -1 | cut -c1-120)"
R=$(kubectl -n mesh-linkerd exec deploy/load -c fortio -- fortio curl -quiet http://echo/ 2>&1); echo "meshed caller -> linkerd echo: $(echo "$R" | grep -m1 -oE 'HTTP/1.1 [0-9]+' || echo "$R" | tail -1 | cut -c1-120)"
outsider -> linkerd echo: HTTP/1.1 403
meshed caller -> linkerd echo: HTTP/1.1 200

Now the outsider gets 403 and the meshed caller still gets 200. Both meshes can block plain-text traffic; Istio does it with PeerAuthentication STRICT, Linkerd with its inbound policy.

Break it and fix it
Measurements, then the outsider: refused by Istio STRICT, accepted by Linkerd until all-authenticated gives 403

POC: prove it works

  • Baseline, Istio and Linkerd measured with the same load (Steps 1 to 4).
  • Both meshes injected sidecars into every pod (READY 2/2).
  • Istio STRICT refused a plain-text caller; Linkerd accepted it by default and refused it (403) after all-authenticated (Break it, Fix it).

Which one should you choose?

If you needLean towards
The smallest sidecar cost and simple operationLinkerd
Many traffic features (complex routing, egress gateways, Wasm plugins, many protocols)Istio
mTLS only between meshed services, fastEither; both did it automatically
Strict "mesh members only" by defaultConfigure it in both: Istio STRICT, Linkerd all-authenticated
Ambient (sidecar-less) modeIstio has an ambient mode; we did not test it here

Clean up (delete everything)

Why: both meshes add webhooks and object types to the cluster. We remove the namespaces, both control planes and the Gateway API types.

# Clean up: both meshes, the Gateway API CRDs and the three namespaces
export PATH=$HOME/.linkerd2/bin:$PATH
kubectl delete namespace plain mesh-istio mesh-linkerd --wait=true 2>&1 | tail -3
linkerd uninstall 2>/dev/null | kubectl delete -f - > /dev/null 2>&1; echo "linkerd removed"
istioctl uninstall --purge -y > /dev/null 2>&1; kubectl delete namespace istio-system --ignore-not-found > /dev/null 2>&1; echo "istio removed"
kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml --ignore-not-found > /dev/null 2>&1; echo "gateway API CRDs removed"
rm -rf istio-1.24.2
echo "mesh namespaces left: $(kubectl get ns --no-headers | grep -cE '^(plain|mesh-istio|mesh-linkerd|istio-system|linkerd) ')"
namespace "plain" deleted
namespace "mesh-istio" deleted
namespace "mesh-linkerd" deleted
linkerd removed
istio removed
gateway API CRDs removed
mesh namespaces left: 0

When you have finished all your Kubernetes labs, delete the cluster:

gcloud container clusters delete lab-cluster --zone=us-east1-b --quiet

FAQ

Can I run both meshes in one cluster? For a test like this one, yes, in different namespaces. In production, pick one.

Does a mesh replace network policies? No. Network policies work at the IP and port level and also protect pods outside the mesh. Use both.

Why is Linkerd's proxy so small? It is built only for the mesh job, in Rust. Envoy is a general proxy with far more features.

Linkerd stable or edge? Linkerd's open-source project publishes edge releases (we used edge-26.11.2); stable builds come from vendors. Check the current licence terms before production.

How much latency is "acceptable"? In our run both meshes added 2 to 4 ms per call. For a chain of 10 calls that adds up; measure your own path.

Troubleshooting

You seeWhyFix
Pods show READY 1/1 after enabling a meshThe pods were created before the label or annotationRestart the deployment so new pods get the sidecar
linkerd install complains about missing typesGateway API CRDs or Linkerd CRDs not installed firstInstall the Gateway API CRDs, then linkerd install --crds, then linkerd install
Outside callers still reach Linkerd servicesThe default inbound policy allows everyoneSet config.linkerd.io/default-inbound-policy=all-authenticated and restart
Istio STRICT breaks a health check from outside the meshThe checker has no sidecarMesh the caller, or use PERMISSIVE for that port only
kubectl top shows nothingThe metrics server needs a minute after pods startWait and run it again

What next

Prepared by the CareerByteCode Team from our tested lab, with AI help for the write-up.

Read next →Site-to-Site VPN Between Two Google Cloud Regions⏱ 13 min

⭐ Keep learning with CareerByteCode

Hand-picked to go deeper on this topic
News, guides and updates from the CareerByteCode team
🏅 Expert writer

The CareerByteCode team writes about what is new on careerbytecode.in: courses, labs, exams, events and the community, which is free to join for influencers and content creators in tech.

Get CareerByteCode Team's next blog by email

One email a week when they publish. Add the weekly Best of ByteBlog too. No spam, unsubscribe with one click.

We email you once to confirm. By subscribing you agree to the privacy policy.

💬 Comments (0)

Top · Newest

Sign in to comment

Related blogs

🧪⭐ Recommended by CareerByteCode · ByteLabs project bundleCloud and DevOps Realtime Starterโ‚น499Build the projects →