Adding Your Service

    For convenience, Linkerd provides a linkerdinject text transform command will add thisannotation to a given Kubernetes manifest. Of course, these annotations can beset by other mechanisms.

    Note that simply adding the annotation to a resource with pre-existing podswill not automatically inject those pods. You will need to update the pods(e.g. with kubectl rollout restart etc.) for them to be injected. With a,the proxy often can be added to a live service without interruption.)

    To add the data plane proxies to a service defined in a Kubernetes manifest,you can use linkerd inject to add the annotations before applying the manifestto Kubernetes:

    This example transforms the file to add injection annotationsin the correct places, then applies it to the cluster.

    Note that it may take several seconds for these metrics to appear once the dataplane proxies have been injected.

    Alternatively, you can query Kubernetes for the list of containers in the pods,and ensure that the proxy is listed:

    If everything was successful, you’ll see linkerd-proxy in the output, e.g.:

    Finally, you can verify that everything is working by verifying that thecorresponding resources are reported to be meshed in the “Meshed” column of theLinkerd dashboard.

    Dashboard

    NoteThere is currently anwhereby network calls made during initialization of your application may fail asthe linkerd-proxy has yet to start. If your application exits when theseinitializations fail, and has a of Always (default) orOnFailure (providing your application exits with with a failure i.e.exit(1)), your container will restart with the ready, thusallowing your application to successfully complete initializations.

    For more information on how the inject command works and all of the parametersthat can be set, see the linkerd inject referencepage.

    For details on how autoinjection works, see the the .