Skip to content

Linkerd — Operations

Scope

Production deployment patterns, operational procedures, performance tuning, and troubleshooting for Linkerd.

Deployment

# Install CLI
curl -sL run.linkerd.io/install | sh

# Pre-flight check
linkerd check --pre

# Install control plane
linkerd install --crds | kubectl apply -f -
linkerd install | kubectl apply -f -

# Verify
linkerd check

Mesh Operations

# Inject sidecar into deployment
kubectl get deploy -n myapp -o yaml | linkerd inject - | kubectl apply -f -

# Or annotate namespace for auto-injection
kubectl annotate namespace myapp linkerd.io/inject=enabled

# Check proxy status
linkerd stat deploy -n myapp
linkerd top deploy -n myapp

Traffic Management

Service Profiles

apiVersion: linkerd.io/v1alpha2
kind: ServiceProfile
metadata:
  name: backend.myapp.svc.cluster.local
spec:
  routes:
  - name: GET /api/health
    condition:
      method: GET
      pathRegex: /api/health
    isRetryable: true
  - name: POST /api/orders
    condition:
      method: POST
      pathRegex: /api/orders
    timeout: 30s

mTLS

# Check mTLS status
linkerd edges deploy -n myapp
linkerd identity -n myapp

# Rotate trust anchor
linkerd upgrade --identity-trust-anchors-file=new-ca.crt | kubectl apply -f -

Monitoring

# Live traffic dashboard
linkerd viz install | kubectl apply -f -
linkerd viz dashboard

# Per-route metrics
linkerd viz routes deploy/backend -n myapp
linkerd viz stat deploy -n myapp --to deploy/database

Common Issues

Issue Diagnosis Fix
Proxy injection fails linkerd check --proxy Check namespace annotation
Identity errors linkerd identity Check trust anchor expiry
High latency linkerd viz stat Check proxy resource limits
Upgrade failures linkerd check Follow step-by-step upgrade docs