How to add a lightweight service mesh with Linkerd
Linkerd is a lightweight mesh that injects a micro-proxy for automatic mTLS and golden metrics. Run linkerd check, install the control plane, mesh a workload, and confirm secured edges in the viz dashboard.
A lightweight service mesh with Linkerd
Linkerd is a small, fast service mesh focused on simplicity. It injects a Rust-based micro-proxy that provides automatic mTLS, retries, and golden metrics (success rate, requests per second, and latency) with minimal configuration and overhead.
Prerequisites
- A Kubernetes cluster.
- The
linkerdCLI installed locally.
Steps
1. Run linkerd check
Validate the cluster is ready:
linkerd check --pre
2. Install the control plane
linkerd install --crds | kubectl apply -f -
linkerd install | kubectl apply -f -
linkerd check
3. Mesh a workload
Inject the proxy into an existing Deployment:
kubectl get deploy myapp -o yaml | linkerd inject - | kubectl apply -f -
Or add the annotation linkerd.io/inject: enabled to the namespace or pod template.
4. Install the viz extension
linkerd viz install | kubectl apply -f -
linkerd viz check
5. View live traffic metrics
linkerd viz stat deploy -n default
linkerd viz dashboard
The dashboard shows success rate, RPS, and latency per service.
6. Confirm automatic mTLS
linkerd viz edges deploy -n default
The SECURED column confirms connections are encrypted with mTLS by default.
Verification
Run linkerd check and confirm all checks pass. Confirm meshed pods have an added linkerd-proxy container. Generate traffic and watch linkerd viz stat report a healthy success rate, and confirm edges shows secured connections.
Next Steps
Add service profiles to define per-route metrics and retries, set up traffic splitting for canary releases, and export Linkerd metrics to Prometheus and Grafana for long-term dashboards and alerting.
Prerequisites
- A Kubernetes cluster
- Linkerd CLI installed
- A workload to mesh
Steps
- 1Run linkerd check
- 2Install the control plane
- 3Mesh a workload
- 4Install the viz extension
- 5View live traffic metrics
- 6Confirm automatic mTLS