Linkerd Patterns
Unverified●21/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor·UnknownWe have not crawled the repo tree, so we will not guess
Codex·UnknownWe have not crawled the repo tree, so we will not guess
Gemini CLI·UnknownThe spec defines no detection rule for Gemini
Copilot·UnknownWe have not crawled the repo tree, so we will not guess
npx agentalley add linkerd-patternsWho is stuck, and on what
Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead.
The whole source
Frontmatter — 2 properties
| name | linkerd-patterns |
|---|---|
| description | Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead. |
| 1 | --- |
| 2 | name: linkerd-patterns |
| 3 | description: Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # Linkerd Patterns |
| 7 | |
| 8 | Production patterns for Linkerd service mesh - the lightweight, security-first service mesh for Kubernetes. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | - Setting up a lightweight service mesh |
| 13 | - Implementing automatic mTLS |
| 14 | - Configuring traffic splits for canary deployments |
| 15 | - Setting up service profiles for per-route metrics |
| 16 | - Implementing retries and timeouts |
| 17 | - Multi-cluster service mesh |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. Linkerd Architecture |
| 22 | |
| 23 | ``` |
| 24 | ┌─────────────────────────────────────────────┐ |
| 25 | │ Control Plane │ |
| 26 | │ ┌─────────┐ ┌──────────┐ ┌──────────────┐ │ |
| 27 | │ │ destiny │ │ identity │ │ proxy-inject │ │ |
| 28 | │ └─────────┘ └──────────┘ └──────────────┘ │ |
| 29 | └─────────────────────────────────────────────┘ |
| 30 | │ |
| 31 | ┌─────────────────────────────────────────────┐ |
| 32 | │ Data Plane │ |
| 33 | │ ┌─────┐ ┌─────┐ ┌─────┐ │ |
| 34 | │ │proxy│────│proxy│────│proxy│ │ |
| 35 | │ └─────┘ └─────┘ └─────┘ │ |
| 36 | │ │ │ │ │ |
| 37 | │ ┌──┴──┐ ┌──┴──┐ ┌──┴──┐ │ |
| 38 | │ │ app │ │ app │ │ app │ │ |
| 39 | │ └─────┘ └─────┘ └─────┘ │ |
| 40 | └─────────────────────────────────────────────┘ |
| 41 | ``` |
| 42 | |
| 43 | ### 2. Key Resources |
| 44 | |
| 45 | | Resource | Purpose | |
| 46 | | ----------------------- | ------------------------------------ | |
| 47 | | **ServiceProfile** | Per-route metrics, retries, timeouts | |
| 48 | | **TrafficSplit** | Canary deployments, A/B testing | |
| 49 | | **Server** | Define server-side policies | |
| 50 | | **ServerAuthorization** | Access control policies | |
| 51 | |
| 52 | ## Templates |
| 53 | |
| 54 | ### Template 1: Mesh Installation |
| 55 | |
| 56 | ```bash |
| 57 | # Install CLI |
| 58 | curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install | shA1 — Downloads and executes without reading firstA4 — This skill pulls in web or user content but never says to treat that content as data. A signal, not proof. |
| 59 | |
| 60 | # Validate cluster |
| 61 | linkerd check --pre |
| 62 | |
| 63 | # Install CRDs |
| 64 | linkerd install --crds | kubectl apply -f - |
| 65 | |
| 66 | # Install control plane |
| 67 | linkerd install | kubectl apply -f - |
| 68 | |
| 69 | # Verify installation |
| 70 | linkerd check |
| 71 | |
| 72 | # Install viz extension (optional) |
| 73 | linkerd viz install | kubectl apply -f - |
| 74 | ``` |
| 75 | |
| 76 | ### Template 2: Inject Namespace |
| 77 | |
| 78 | ```yaml |
| 79 | # Automatic injection for namespace |
| 80 | apiVersion: v1 |
| 81 | kind: Namespace |
| 82 | metadata: |
| 83 | name: my-app |
| 84 | annotations: |
| 85 | linkerd.io/inject: enabled |
| 86 | --- |
| 87 | # Or inject specific deployment |
| 88 | apiVersion: apps/v1 |
| 89 | kind: Deployment |
| 90 | metadata: |
| 91 | name: my-app |
| 92 | annotations: |
| 93 | linkerd.io/inject: enabled |
| 94 | spec: |
| 95 | template: |
| 96 | metadata: |
| 97 | annotations: |
| 98 | linkerd.io/inject: enabled |
| 99 | ``` |
| 100 | |
| 101 | ### Template 3: Service Profile with Retries |
| 102 | |
| 103 | ```yaml |
| 104 | apiVersion: linkerd.io/v1alpha2 |
| 105 | kind: ServiceProfile |
| 106 | metadata: |
| 107 | name: my-service.my-namespace.svc.cluster.local |
| 108 | namespace: my-namespace |
| 109 | spec: |
| 110 | routes: |
| 111 | - name: GET /api/users |
| 112 | condition: |
| 113 | method: GET |
| 114 | pathRegex: /api/users |
| 115 | responseClasses: |
| 116 | - condition: |
| 117 | status: |
| 118 | min: 500 |
| 119 | max: 599 |
| 120 | isFailure: true |
| 121 | isRetryable: true |
| 122 | - name: POST /api/users |
| 123 | condition: |
| 124 | method: POST |
| 125 | pathRegex: /api/users |
| 126 | # POST not retryable by default |
| 127 | isRetryable: false |
| 128 | - name: GET /api/users/{id} |
| 129 | condition: |
| 130 | method: GET |
| 131 | pathRegex: /api/users/[^/]+ |
| 132 | timeout: 5s |
| 133 | isRetryable: true |
| 134 | retryBudget: |
| 135 | retryRatio: 0.2 |
| 136 | minRetriesPerSecond: 10 |
| 137 | ttl: 10s |
| 138 | ``` |
| 139 | |
| 140 | ### Template 4: Traffic Split (Canary) |
| 141 | |
| 142 | ```yaml |
| 143 | apiVersion: split.smi-spec.io/v1alpha1 |
| 144 | kind: TrafficSplit |
| 145 | metadata: |
| 146 | name: my-service-canary |
| 147 | namespace: my-namespace |
| 148 | spec: |
| 149 | service: my-service |
| 150 | backends: |
| 151 | - service: my-service-stable |
| 152 | weight: 900m # 90% |
| 153 | - service: my-service-canary |
| 154 | weight: 100m # 10% |
| 155 | ``` |
| 156 | |
| 157 | ### Template 5: Server Authorization Policy |
| 158 | |
| 159 | ```yaml |
| 160 | # Define the server |
| 161 | apiVersion: policy.linkerd.io/v1beta1 |
| 162 | kind: Server |
| 163 | metadata: |
| 164 | name: my-service-http |
| 165 | namespace: my-namespace |
| 166 | spec: |
| 167 | podSelector: |
| 168 | matchLabels: |
| 169 | app: my-service |
| 170 | port: http |
| 171 | proxyProtocol: HTTP/1 |
| 172 | --- |
| 173 | # Allow traffic from specific clients |
| 174 | apiVersion: policy.linkerd.io/v1beta1 |
| 175 | kind: ServerAuthorization |
| 176 | metadata: |
| 177 | name: allow-frontend |
| 178 | namespace: my-namespace |
| 179 | spec: |
| 180 | server: |
| 181 | name: my-service-http |
| 182 | client: |
| 183 | meshTLS: |
| 184 | serviceAccounts: |
| 185 | - name: frontend |
| 186 | namespace: my-namespace |
| 187 | --- |
| 188 | # Allow unauthenticated traffic (e.g., from ingress) |
| 189 | apiVersion: policy.linkerd.io/v1beta1 |
| 190 | kind: ServerAuthorization |
| 191 | metadata: |
| 192 | name: allow-ingress |
| 193 | namespace: my-namespace |
| 194 | spec: |
| 195 | server: |
| 196 | name: my-service-http |
| 197 | client: |
| 198 | unauthenticated: true |
| 199 | networks: |
| 200 | - cidr: 10.0.0.0/8 |
| 201 | ``` |
| 202 | |
| 203 | ### Template 6: HTTPRoute for Advanced Routing |
| 204 | |
| 205 | ```yaml |
| 206 | apiVersion: policy.linkerd.io/v1beta2 |
| 207 | kind: HTTPRoute |
| 208 | metadata: |
| 209 | name: my-route |
| 210 | namespace: my-namespace |
| 211 | spec: |
| 212 | parentRefs: |
| 213 | - name: my-service |
| 214 | kind: Service |
| 215 | group: core |
| 216 | port: 8080 |
| 217 | rules: |
| 218 | - matches: |
| 219 | - path: |
| 220 | type: PathPrefix |
| 221 | value: /api/v2 |
| 222 | - headers: |
| 223 | - name: x-api-version |
| 224 | value: v2 |
| 225 | backendRefs: |
| 226 | - name: my-service-v2 |
| 227 | port: 8080 |
| 228 | - matches: |
| 229 | - path: |
| 230 | type: PathPrefix |
| 231 | value: /api |
| 232 | backendRefs: |
| 233 | - name: my-service-v1 |
| 234 | port: 8080 |
| 235 | ``` |
| 236 | |
| 237 | ### Template 7: Multi-cluster Setup |
| 238 | |
| 239 | ```bash |
| 240 | # On each cluster, install with cluster credentials |
| 241 | linkerd multicluster install | kubectl apply -f - |
| 242 | |
| 243 | # Link clusters |
| 244 | linkerd multicluster link --cluster-name west \ |
| 245 | --api-server-address https://west.example.com:6443 \ |
| 246 | | kubectl apply -f - |
| 247 | |
| 248 | # Export a service to other clusters |
| 249 | kubectl label svc/my-service mirror.linkerd.io/exported=true |
| 250 | |
| 251 | # Verify cross-cluster connectivity |
| 252 | linkerd multicluster check |
| 253 | linkerd multicluster gateways |
| 254 | ``` |
| 255 | |
| 256 | ## Monitoring Commands |
| 257 | |
| 258 | ```bash |
| 259 | # Live traffic view |
| 260 | linkerd viz top deploy/my-app |
| 261 | |
| 262 | # Per-route metrics |
| 263 | linkerd viz routes deploy/my-app |
| 264 | |
| 265 | # Check proxy status |
| 266 | linkerd viz stat deploy -n my-namespace |
| 267 | |
| 268 | # View service dependencies |
| 269 | linkerd viz edges deploy -n my-namespace |
| 270 | |
| 271 | # Dashboard |
| 272 | linkerd viz dashboard |
| 273 | ``` |
| 274 | |
| 275 | ## Debugging |
| 276 | |
| 277 | ```bash |
| 278 | # Check injection status |
| 279 | linkerd check --proxy -n my-namespace |
| 280 | |
| 281 | # View proxy logs |
| 282 | kubectl logs deploy/my-app -c linkerd-proxy |
| 283 | |
| 284 | # Debug identity/TLS |
| 285 | linkerd identity -n my-namespace |
| 286 | |
| 287 | # Tap traffic (live) |
| 288 | linkerd viz tap deploy/my-app --to deploy/my-backend |
| 289 | ``` |
| 290 | |
| 291 | ## Best Practices |
| 292 | |
| 293 | ### Do's |
| 294 | |
| 295 | - **Enable mTLS everywhere** - It's automatic with Linkerd |
| 296 | - **Use ServiceProfiles** - Get per-route metrics and retries |
| 297 | - **Set retry budgets** - Prevent retry storms |
| 298 | - **Monitor golden metrics** - Success rate, latency, throughput |
| 299 | |
| 300 | ### Don'ts |
| 301 | |
| 302 | - **Don't skip check** - Always run `linkerd check` after changes |
| 303 | - **Don't over-configure** - Linkerd defaults are sensible |
| 304 | - **Don't ignore ServiceProfiles** - They unlock advanced features |
| 305 | - **Don't forget timeouts** - Set appropriate values per route |
| 306 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Paper Poster (HTML): measurement-gated poster generationDEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real paper figures, a two-hue design-token system, and print-ready PDF via headless Chromium. Use when the●····●36/40Brand Monitoring 📡Brand monitoring tool for tracking mentions across social media platforms. Monitor Reddit, Google News, YouTube, and DuckDuckGo for brand mentions. Includes sentiment analysis, trend tracking, crisis detection, and competitor comparison. No API key required fo◐····●34/40Spark Memory & Thermal OpsManage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.◐····●32/40Secrets ManagementImplement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.◐····●32/40