🔧 DevOps

Linkerd

Linkerd

A lightweight service mesh. Written in Rust, simple configuration.

Detailed Explanation

Linkerd is an ultralight service mesh developed by Buoyant, and the project that coined the term "service mesh." Its data plane (linkerd2-proxy), written in Rust, uses less than 10MB of memory, which is much lighter than Istio's Envoy (about 50MB). It is a CNCF graduated project.

Linkerd's design philosophy is "simplicity." Installation takes just two CLI lines (`linkerd install | kubectl apply`, `linkerd inject`), and mTLS, metrics, retries, and timeouts are applied automatically with the default configuration alone. You can see results right away without learning complex CRDs as with Istio.

Its key features include automatic mTLS (encrypted communication between services), automatic collection of golden metrics (success rate, latency, request volume), and automatic application of retries and timeouts. The Linkerd Dashboard and the Viz extension let you visualize service topology and real-time metrics.

When choosing between Istio and Linkerd, Istio is suitable if you need complex traffic routing (A/B testing, traffic mirroring), and Linkerd is recommended if you want fast adoption and low operational overhead. In practice, many teams start their service mesh with Linkerd and migrate to Istio when their requirements become more complex.

Code Example

# Linkerd CLI 설치 (macOS)
brew install linkerd

# 클러스터 사전 검사
linkerd check --pre

# Linkerd Control Plane 설치
linkerd install --crds | kubectl apply -f -
linkerd install | kubectl apply -f -

# 설치 확인
linkerd check

# Viz 확장 (대시보드, 메트릭) 설치
linkerd viz install | kubectl apply -f -

# 기존 Deployment에 사이드카 주입
kubectl get deploy -n my-app -o yaml | linkerd inject - | kubectl apply -f -

# 또는 namespace에 annotation으로 자동 주입 설정
kubectl annotate namespace my-app linkerd.io/inject=enabled

# 대시보드 접속
linkerd viz dashboard &

# 서비스 메트릭 확인
linkerd viz stat deploy -n my-app

# 실시간 요청 확인
linkerd viz tap deploy/api-server -n my-app

# ServiceProfile로 재시도 정책 설정
cat <

How It's Said in Practice

Infrastructure lead: "The idea of adopting a service mesh came up, but I think Istio's learning curve would be steep for our team size."

DevOps: "How about Linkerd? It's easy to install, and you can use mTLS and metrics right away with just the basic features."

Infrastructure lead: "Sounds good. Let's apply it to the development environment first, and expand after checking the operational complexity."

Interviewer: "You said Linkerd is lighter than Istio. Specifically, where does the difference come from?"

Candidate: "The biggest difference is the proxy. Linkerd uses a dedicated proxy written in Rust, which takes about 10MB per Pod, whereas Istio's Envoy takes 50MB or more. Istio has richer features, but for a setup like ours with fewer than 20 services, Linkerd was a good fit."

Take a mock interview on this topic → WIA SOOM AI Interview · Start for free

Reviewer: "Injecting with linkerd inject restarts the Pod, so be careful with the rolling deployment."

Developer: "Okay, I'll set it with a namespace annotation so it gets injected automatically on the next deployment."

Cautions

  • Linkerd supports only gRPC, HTTP/1.1, and HTTP/2. If you need a TCP proxy or advanced traffic routing, consider Istio
  • When linkerd-proxy is injected, the initContainer configures the network, so Pod startup time increases slightly
  • Before adopting it in production, be sure to verify cluster compatibility with the `linkerd check` command

Learn More