I have a simple 3 node k8s cluster, (I wanted to keep it simple to understand so I created a 3 node cluster)
master
node1
node2
I deployed linkerd as daemonset and hello-world app as replication controller with 2 replicas with service deployment and got the pods deployed in this fashion,
master(k8s specific pods)
node1 (Linkerd, helloworld-replica1)
node2 (helloworld-replica2)
Possible paths here
http_proxy=$(kubectl get svc l5d -o jsonpath="{.status.loadBalancer.ingress[0].*}"):4140 curl http://helloworld-service
My request to hello-world through linkerd will take two possible paths,
either
curl -> l5d -> ELB -> helloworld-replica1 (in node1)
or
curl -> l5d -> ELB -> helloworld-replica2 (in node2)
What is my Question
is it possible for the linkerd to identify every time, if the request is going to node1 or node2 ?
at configuration level or at source code level?
Note that the Linkerd’s incoming router will always forward to application instances on the same node. You can use distributed tracing to see exactly which node each request went to.
Strictly, as daemonset doesn’t ensures that. From k8s doc “A DaemonSet ensures that all (or some) nodes run a copy of a pod”.
Well, the zipkins distributed tracing is great help!
@zshaik FWIW, my interpretation of that line in the K8s docs is that a DaemonSet can optionally be restricted to only apply to a subset of the nodes. In the absence of these restrictions, deploying as a DaemonSet will ensure that the pod runs on every node.