website
website copied to clipboard
Update documentation to be clearer about where to add auto injection annotations
When I was setting linkerd2 up for the first time I added my inkerd.io/inject: enabled
annotation to the deployment, and I was seeing the injector skipping it. After discussing on slack I was pointed in the right direction and moved it pod template where things worked correctly.
However, the documentation in a couple of places seems to suggest that my original way would have worked correctly. The wording which was throwing me off was:
Linkerd automatically adds the data plane proxy to pods when the
linkerd.io/inject: enabled
annotation is present on a namespace, deployment, or pod.
from here: https://linkerd.io/2/features/proxy-injection/
This is typically done by annotating the namespace, deployment, or pod with the
linkerd.io/inject: enabled
Kubernetes annotation, which will trigger automatic proxy injection when the resources are created.
from here: https://linkerd.io/2/tasks/adding-your-service/
Also now that linkerd/linkerd2#3194 has merged, we should point out that these annotations are also available at the namespace level