diagnostics

Commands used to diagnose Linkerd components.

This command provides subcommands to diagnose the functionality of Linkerd.

Examples

# Get control-plane component metrics
linkerd diagnostics controller-metrics

# Get metrics from the web deployment in the emojivoto namespace.
linkerd diagnostics proxy-metrics -n emojivoto deploy/web

# Get the endpoints for authorities in Linkerd's control-plane itself
linkerd diagnostics endpoints web.linkerd-viz.svc.cluster.local:8084

Subcommands

controller-metrics

Fetch metrics directly from Linkerd control plane containers.

This command initiates port-forward to each control plane process, and queries the /metrics endpoint on them.

Flags

FlagUsage
--wait
-w
Time allowed to fetch diagnostics

endpoints

Introspect Linkerd’s service discovery state.

This command provides debug information about the internal state of the control-plane’s destination container. It queries the same Destination service endpoint as the linkerd-proxy’s, and returns the addresses associated with that destination.

Examples

# get all endpoints for the authorities emoji-svc.emojivoto.svc.cluster.local:8080 and web-svc.emojivoto.svc.cluster.local:80
linkerd diagnostics endpoints emoji-svc.emojivoto.svc.cluster.local:8080 web-svc.emojivoto.svc.cluster.local:80

# get that same information in json format
linkerd diagnostics endpoints -o json emoji-svc.emojivoto.svc.cluster.local:8080 web-svc.emojivoto.svc.cluster.local:80

# get the endpoints for authorities in Linkerd's control-plane itself
linkerd diagnostics endpoints web.linkerd-viz.svc.cluster.local:8084

Flags

FlagUsage
--destination-podTarget a specific destination Pod when there are multiple running
--output
-o
Output format; one of: “table” or “json”

install-sp

proxy-metrics

Fetch metrics directly from Linkerd proxies.

This command initiates a port-forward to a given pod or set of pods, and queries the /metrics endpoint on the Linkerd proxies.

The RESOURCE argument specifies the target resource to query metrics for: (TYPE/NAME)

Examples: * cronjob/my-cronjob * deploy/my-deploy * ds/my-daemonset * job/my-job * po/mypod1 * rc/my-replication-controller * sts/my-statefulset

Valid resource types include: * cronjobs * daemonsets * deployments * jobs * pods * replicasets * replicationcontrollers * statefulsets

Examples

# Get metrics from pod-foo-bar in the default namespace.
linkerd diagnostics proxy-metrics po/pod-foo-bar

# Get metrics from the web deployment in the emojivoto namespace.
linkerd diagnostics proxy-metrics -n emojivoto deploy/web

# Get metrics from the linkerd-destination pod in the linkerd namespace.
linkerd diagnostics proxy-metrics -n linkerd $(
  kubectl --namespace linkerd get pod \
    --selector linkerd.io/control-plane-component=destination \
    --output name
)

Flags

FlagUsage
--namespace
-n
Namespace of resource
--obfuscateObfuscate sensitive information