In order for your service to take advantage of Linkerd, it needs to have the
proxy sidecar added to its resource definition. This is done by using the
Linkerd CLI to update the definition
and output YAML that can be passed to
kubectl. By using Kubernetes’ rolling
updates, the availability of your application will not be affected.
To add Linkerd to your service, run:
linkerd inject deployment.yml \ | kubectl apply -f -
deployment.yml is the Kubernetes config file containing your
application. This will add the proxy sidecar along with an
configures iptables to pass all traffic through the proxy. By applying this new
kubectl, a rolling update of your deployment will be
triggered replacing each pod with a new one.
You will know that your service has been successfully added to the service mesh if it’s pods are reported to be meshed in the Meshed column of the Linkerd dashboard.
You can always get to the Linkerd dashboard by running:
For more information on how the inject command works and all of the parameters that can be set, look at the reference.