Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Linkerd CLI

$ linkerd Foundation Med Risk
Linkerd / CNCF · Cloud & Infra · Apache-2.0 · macos / linux / windows

The Linkerd CLI (linkerd) manages Linkerd's Kubernetes service mesh control plane and diagnostics. It emits structured JSON on linkerd check --output json and linkerd viz tap -o json, while linkerd install and linkerd inject generate YAML manifests to stdout without mutating the cluster directly.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
brew install linkerd
CLI vs MCP Decision CLI Preferred vs MCP

Prefer linkerd over generic Kubernetes MCP tools for mesh diagnostics: check --output json and viz tap -o json expose mTLS and proxy health directly.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports -o json / --output json on check, viz tap, and diagnostics endpoints, with predictable non-TTY execution and clean exit codes.

  • linkerd check --output json returns structured check results
  • linkerd viz tap -o json streams parseable JSON request events
Trust & Safety 22 / 25

install, upgrade, and inject are pure manifest generators to stdout, leaving cluster writes to explicit kubectl apply.

  • Control-plane mutations require explicit piping to kubectl apply
Setup & Portability 14 / 15

Single static Go binary available via Homebrew and official GitHub Releases across macOS, Linux, and Windows.

  • Available via brew install linkerd and release tarballs
Utility & Efficiency 13 / 15

Covers control-plane checks, proxy injection, mTLS verification, and live L7 viz tap traffic inspection in one binary.

  • Unified diagnostics across control plane and data plane proxies
Maintenance & Lineage 9 / 10

CNCF Graduated project (linkerd/linkerd2) licensed under Apache-2.0.

  • Official linkerd/linkerd2 repository
Docs & Verifiability 8 / 10

Detailed CLI reference docs and consistent subcommand --help pages.

  • CLI reference published at linkerd.io/2/reference/cli/

Security, Auth & Guardrails

Auth Modes
Config File
Credential Storage

Reads Kubernetes cluster access and RBAC contexts from KUBECONFIG (~/.kube/config).

Side Effects
Read-Only Remote Write
Cost & Quotas

Open-source CNCF Graduated project (Apache-2.0) and free to run.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Linkerd CLI Agent Rules
- Always run `linkerd check --output json` before proposing mesh upgrades or injections.
- Never pipe `linkerd install` or `linkerd upgrade` directly into `kubectl apply` without reviewing the rendered YAML first.
- Bound `linkerd viz tap` streams with `-n` and head/limit flags so live traffic logs do not flood context.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run mesh preflight and control-plane health checks as JSON
linkerd check --output json

Outputs structured JSON pass/fail checks across Kubernetes version, certificates, and control-plane pods.

Inspect meshed endpoints in JSON
linkerd diagnostics endpoints web-svc.default.svc.cluster.local:8080 -o json

Queries destination service endpoint discovery and TLS identity metadata in JSON.

Controlled Writes & Previews

Render control-plane manifests without applying
linkerd install --crds > linkerd-crds.yaml && linkerd install > linkerd-cp.yaml

Generates declarative YAML manifests locally for review or GitOps before piping to kubectl apply.

Strengths for Agents

  • + linkerd check --output json gives agents deterministic, machine-readable cluster and mesh health verdicts.
  • + install and inject act as safe stdout YAML generators rather than implicit cluster mutators.
  • + Live viz tap -o json supports filtering by namespace, target, and HTTP path.

Caveats & Pitfalls

  • ! linkerd viz tap streams indefinitely unless bounded with a timeout or line limit.
  • ! Extension commands like viz require the Linkerd Viz extension to be installed on the cluster.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI