Enabling Add-Ons

Linkerd can also be installed with a number of Add-On’s, allowing users to get a great out of the box experience around popular service mesh use-cases. These Add-On’s are coupled with the control plane installation and integrate well with Linkerd.

Add-On’s in Linkerd are optional and configurable. A configuration file is passed to the install operation (available both through Helm and CLI). This config is also stored as a configmap called linkerd-values, allowing upgrades to work seamlessly without having user to pass the config file again. Configuration can be updated during upgrades.

Note

Add-On’s are available in Linkerd starting from version edge-20.2.3.

You can find the list of add-ons present in the Linkerd2 Add-On’s charts directory.

Now, Let us see the installation of the Tracing Add-On. In this demo, We also enable enable the control-plane-tracing flag which would, make the control-plane components send traces to the collector.

Other Add-On’s would also have a similar installation approach.

Add-On’s Configuration

The following is the Add-On configuration file, that will be passed to installation. Here we configure the Tracing Add-On to be enabled, and also overwrite the trace collector’s resources. If values are not overwritten, The default values will be used.

  1. cat > config.yaml << EOF
  2. tracing:
  3. enabled: true
  4. collector:
  5. resources:
  6. cpu:
  7. limit: 100m
  8. request: 10m
  9. memory:
  10. limit: 100Mi
  11. request: 50Mi
  12. EOF

The same configuration file can be used both through the CLI and Helm.

Installation through CLI

linkerd CLI now supports a addon-config flag, which is used to pass the confiugration of add-ons. Now, the above configuration file can be passed as

  1. # Install with control plane tracing enabled, and a add-on configuration file
  2. linkerd install --control-plane-tracing --addon-config ./config.yaml

Installation through Helm

First, You have to follow the usual process of installing Linkerd2 through Helm, . Only the final installation command is changed to include the add-on configuration.

Now, we pass the add-on configuration file to the helm install command.

  1. # Install with control plane tracing enabled, and a add-on configuration file
  2. helm install \
  3. --name=linkerd2 \
  4. --set-file global.identityTrustAnchorsPEM=ca.crt \
  5. --set-file identity.issuer.tls.crtPEM=issuer.crt \
  6. --set-file identity.issuer.tls.keyPEM=issuer.key \
  7. --set identity.issuer.crtExpiry=$exp \
  8. --set global.controlPlaneTracing=true \
  9. -f config.yaml \
  10. linkerd-edge/linkerd2

Tracing Demo

First, you should also see two new components be installed i.e linkerd-collector and linkerd-jaeger.

  1. $ kubectl -n linkerd get deployments
  2. NAME READY UP-TO-DATE AVAILABLE AGE
  3. linkerd-collector 1/1 1 1 4m11s
  4. linkerd-controller 1/1 1 1 4m11s
  5. linkerd-destination 1/1 1 1 4m11s
  6. linkerd-grafana 1/1 1 1 4m11s
  7. linkerd-identity 1/1 1 1 4m11s
  8. linkerd-jaeger 1/1 1 1 4m11s
  9. linkerd-prometheus 1/1 1 1 4m11s
  10. linkerd-proxy-injector 1/1 1 1 4m11s
  11. linkerd-smi-metrics 1/1 1 1 4m11s
  12. linkerd-sp-validator 1/1 1 1 4m11s
  13. linkerd-tap 1/1 1 1 4m11s
  14. linkerd-web 1/1 1 1 4m11s

Now, The control-plane components traces, along with the linkerd-proxy traces are sent to the linkerd-collector, which are then sent to the linkerd-jaeger. These Traces can be viewed in the jaeger UI by port-forwarding the service as

  1. kubectl -n linkerd port-forward svc/linkerd-jaeger 16686:16686

Traces from the control-plane components can be viewed at localhost:16886