Linkerd CLI
$ linkerd Foundation Med RiskThe 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.
brew install linkerd 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
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -o json / --output json on check, viz tap, and diagnostics endpoints, with predictable non-TTY execution and clean exit codes.
linkerd check --output jsonreturns structured check resultslinkerd viz tap -o jsonstreams parseable JSON request events
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
Single static Go binary available via Homebrew and official GitHub Releases across macOS, Linux, and Windows.
- Available via
brew install linkerdand release tarballs
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
CNCF Graduated project (linkerd/linkerd2) licensed under Apache-2.0.
- Official
linkerd/linkerd2repository
Detailed CLI reference docs and consistent subcommand --help pages.
- CLI reference published at linkerd.io/2/reference/cli/
Security, Auth & Guardrails
Reads Kubernetes cluster access and RBAC contexts from KUBECONFIG (~/.kube/config).
Open-source CNCF Graduated project (Apache-2.0) and free to run.
# 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
linkerd check --output json
Outputs structured JSON pass/fail checks across Kubernetes version, certificates, and control-plane pods.
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
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 jsongives agents deterministic, machine-readable cluster and mesh health verdicts. - +
installandinjectact as safe stdout YAML generators rather than implicit cluster mutators. - + Live
viz tap -o jsonsupports filtering by namespace, target, and HTTP path.
Caveats & Pitfalls
- !
linkerd viz tapstreams indefinitely unless bounded with a timeout or line limit. - ! Extension commands like
vizrequire the Linkerd Viz extension to be installed on the cluster.