Proxy Configuration

Linkerd provides a set of annotations that can be used to override the data plane proxy’s configuration. This is useful for overriding the default configurations of auto-injected proxies.

The following is the list of supported annotations:

Annotation Description The proxy sidecar will stay alive for at least the given period before receiving SIGTERM signal from Kubernetes but no longer than pod’s terminationGracePeriodSeconds. If not provided, it will be defaulted to 0 Proxy port to serve metrics on Proxy port to use for control Linkerd debug container image name Docker image pull policy for debug image Linkerd debug container image version Disables resources from participating in TLS identity Inject a debug sidecar for data plane debugging Enable service profiles for non-Kubernetes services Docker image pull policy Proxy port to use for inbound traffic Linkerd init container image name Linkerd init container image version Ports that skip the proxy’s protocol detection mechanism and are proxied opaquely. Comma-separated list of values, where each value can be a port number or a range a-b. Proxy port to use for outbound traffic Maximum amount of CPU units that the proxy sidecar can use Amount of CPU units that the proxy sidecar requests Linkerd proxy container image name Log format (plain or json) for the proxy Log level for the proxy Maximum amount of Memory that the proxy sidecar can use Amount of Memory that the proxy sidecar requests Used to configure the outbound TCP connection timeout in the proxy Run the proxy under this user ID Tag to be used for the Linkerd proxy images Ports that should skip the proxy and send directly to the application. Comma-separated list of values, where each value can be a port number or a range a-b. Outbound ports that should skip the proxy. Comma-separated list of values, where each value can be a port number or a range a-b. Controls whether or not a pod should be injected; accepted values are enabled, disabled and ingress

For example, to update an auto-injected proxy’s CPU and memory resources, we insert the appropriate annotations into the spec.template.metadata.annotations of the owner’s pod spec, using kubectl edit like this:

      annotations: "1" "0.2" 2Gi 128Mi

See here for details on tuning the proxy’s resource usage.

For proxies injected using the linkerd inject command, configuration can be overridden using the command-line flags.

Ingress Mode

Proxy ingress mode is a mode of operation designed to help Linkerd integrate with certain ingress controllers. Ingress mode is necessary if the ingress itself cannot be otherwise configured to use the Service port/ip as the destination.

When an individual Linkerd proxy is set to ingress mode, it will route requests based on their :authority, Host, or l5d-dst-override headers instead of their original destination. This will inform Linkerd to override the endpoint selection of the ingress container and to perform its own endpoint selection, enabling features such as per-route metrics and traffic splitting.

The proxy can be made to run in ingress mode by used the ingress annotation rather than the default enabled annotation. This can also be done with the --ingress flag in the inject CLI command:

kubectl get deployment <ingress-controller> -n <ingress-namespace> -o yaml | linkerd inject --ingress - | kubectl apply -f -