This is not the latest version of Linkerd!
This documentation is for an older version of Linkerd. You may want the Linkerd 2.12 (current) documentation instead.

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 linkerd-controller-api.linkerd.svc.cluster.local:8085

# Install service profiles for the control-plane components.
linkerd diagnostics install-sp

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 linkerd-controller-api.linkerd.svc.cluster.local:8085
linkerd diagnostics endpoints linkerd-web.linkerd.svc.cluster.local:8084

Flags

FlagUsage
--output
-o
Output format; one of: “table” or “json”

install-sp

Output Kubernetes configs to install Linkerd Service Profiles.

This command installs Service Profiles into the Linkerd control plane. A cluster-wide Linkerd control-plane is a prerequisite. To confirm Service Profile support, verify “kubectl api-versions” outputs “linkerd.io/v1alpha2”.

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-controller pod in the linkerd namespace.
linkerd diagnostics proxy-metrics -n linkerd $(
  kubectl --namespace linkerd get pod \
    --selector linkerd.io/control-plane-component=controller \
    --output name
)

Flags

FlagUsage
--namespace
-n
Namespace of resource