Traffic is not coming to newly replicated pods in hpa kubernetes

8/4/2021

I have created HPA object for my deployment. Once the target CPU is reached, new pods are spinning up. But when i look for the CPU usage, it still stays at 0m and no traffic is going to the new pods. What may be root cause for this issue?

-- Ramanichandran
amazon-eks
hpa
kubernetes

1 Answer

8/9/2021

This is a community wiki answer posted for better visibility. Feel free to expand it.

As mentioned in the comments, the issue was with with sessionAffinity parameter in the service spec which was not allowing to divert traffic to newly created replicas.

-- WytrzymaƂy Wiktor
Source: StackOverflow