<p>I'm trying to connect to Google cloud memorystore from kubernetes pod but I always get connection timeout error.</p>

<p>After investigation I found the following:</p>

<ul>
<li><p>when I'm trying to connect to redis from pod which scheduled on the normal node pool, it works fine.</p></li>
<li><p>but when I'm trying to connect to redis from pod which scheduled on the Preembtiple node pool, it fails and I get connection timeout error.</p></li>
</ul>

<p>So how can I solve this problem?</p>

amohamed
<p>it's a bit hard to give an answer with the little informations you gave, we don't know any configuration of you cluster.</p>

<p>Not sure if I'm totally in the wrong but it may help.</p>

<p>Normal or preemptible node should not have any effect on the network connections if the nodes are on the same network. Whate could cause this on gke pods is that the memorystore works by creating a vpc peering, and that gke works sort of in the same way, thus preventing the memstore and the pods to speak to one another as two peering can't exchange with one another.</p>

<p>What should be done in this case is the use of ip aliasing in the gke creation: <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips</a></p>

<p>Hope this can help you.</p>
