0

I have a requirement where I need to implement session affinity. We have currently configured istio with service mesh on our kube clusters. There is a sidecar running with each pod in the service mesh. We have found a way to redirect external traffic to a specific pod based on client IP using config changes in ingress. However, since the internal call (pod to pod/service) are resolved by kube DNS, they do not pass through ingress and I'm unable to redirect the internal to a specific pod within a service.

An example: Service A contains Pod A and Pod B. During external calls, I'm able to redirect all calls to pod A with session affinity. What if I want to make an internal call? Let's say a new request comes to Pod B, I make an internal call to Service A which should redirect the call to Pod A. Is there a way to achieve this using istio service mesh?

Vaibhav
  • 507
  • 2
  • 4
  • 20
  • Will this [link](https://tetratelabs.io/istio-in-practice/sticky-sessions/) help? – Dharani Dhar Golladasari Apr 04 '23 at 12:42
  • @DharaniDharGolladasari Thanks for this link but this link also gives and example of redirecting external calls. What happens when I want to session affinity within a service (pod-to-pod communication)? – Vaibhav Apr 06 '23 at 05:16

0 Answers0