<p>I am using <a href="https://www.npmjs.com/package/memory-cache" rel="nofollow noreferrer">https://www.npmjs.com/package/memory-cache</a> package for caching purpose. I've given time value to expire cached data but need to create route using express so it can be cleared forcefully in case of any issue.
is there any way to hit all server pods and clear server cache? Now When I hit that route it just clears data for one pod only where request goes</p>

Nikhil
<p>You can use the <strong>Headless service</strong> in this case which will return IPs of PODs running behind the service.</p>
<p><strong>Or else</strong></p>
<p>you can use the command :</p>
<p><code>kubectl get endpoints &lt;your-service&gt;</code> provides a list of <code>IPs</code> that you can use to route to each of the pods. Once you get the IPs you can hit the each PODs one by one using code or command. Headless service would be better option instead.</p>
<p>Example : <a href="https://dev.to/kaoskater08/building-a-headless-service-in-kubernetes-3bk8" rel="nofollow noreferrer">https://dev.to/kaoskater08/building-a-headless-service-in-kubernetes-3bk8</a></p>
