<p>I have a <code>spring boot</code> api running on <code>google cloud kubernetes cluster</code>, I wanna have a caching server to use for my api so I thought to use <code>memcache</code>.</p>

<p>I tried two ways of doing it:</p>

<ol>
<li>I downloaded the <code>memcache</code> from the google launcher which is basically deploying an instance of <code>memcache</code> on a vm. And then I assigned an external <code>IP</code> to my vm, whitelisted my ip to try it locally and ofc opened the port <code>11211</code> (the default one). For the client side I used, <a href="https://github.com/sixhours-team/memcached-spring-boot" rel="nofollow noreferrer">this guy</a>, specified the ip address but I still get connection cancelled : <code>java.util.concurrent.CancellationException: Cancelled</code> and the doc is bad so I could find anything that helps.</li>
<li>I decided to try another way, which is following <a href="https://cloud.google.com/solutions/deploying-memcached-on-kubernetes-engine" rel="nofollow noreferrer">this tutorial</a> and now I have the <code>memcached</code> cluster but I don't know how to consume these pods from my other cluster or should the pods be on the same cluster i have the api running on?</li>
</ol>

<p>I would appreciate any help, this is my first encounter with the global caching.</p>

user2137817
<p>So I figured it out based on Jonah Benton's advice.</p>

<p>It was actually pretty simple, i used <a href="https://github.com/GoogleCloudPlatform/memcached-docker/blob/master/1/README.md" rel="nofollow noreferrer">this tutorial</a> to create a new pod running <code>memcached</code> in my cluster and then I used <a href="https://github.com/sixhours-team/memcached-spring-boot" rel="nofollow noreferrer">this</a> client to connect on it and it worked like a charm!</p>

<p>Hope it helps someone.</p>
