linkerd / linkerd-examples

Examples of how to configure and run linkerd
https://linkerd.io
Apache License 2.0
431 stars 220 forks source link

Add ClusterFirstWithHostNet DNS policy to linkerd-cni #177

Closed hawkw closed 7 years ago

hawkw commented 7 years ago

In order to support Zipkin telemetry in CNI deployments of Linkerd, we have to request dnsPolicy: ClusterFirstWithHostNet. Otherwise due to hostNetwork: true Pod specifier (for CNI deployment) the dnsPolicy: default is applied so that "cluster" addresses (....svc.cluster.local) are not resolved because default dns policy is to use node's host /etc/resolv.conf which may or may not (as it is in my case) refer to kube-dns for name resolution, at least this kind (the latter) of resolv.conf setup is done by kubeadm.

I've split the linkerd-cni.yml config file into separate linkerd-cni.yml and linkerd-cni-legacy.yml, since this DNS policy is not supported in versions of Kubernetes prior to 1.6. I've added comments noting that the legacy config should be used on earlier Kubernetes versions, and that Zipkin telemetry will not be supported with that config.

Fixes #161