<p>We want to deploy an application that utilizes memory cache using docker and kubernetes with horizontal pod auto-scale, but we have no idea if the containerized application inside the pods would use the same cache since it won't be guaranteed that the pods would be in the same node when scaled by the auto-scaler.</p>

<p>I've tried searching for information regarding cache memory on kubernetes clusters, and all I found is a statement in a <a href="https://medium.com/google-cloud/kubernetes-101-pods-nodes-containers-and-clusters-c1509e409e16" rel="nofollow noreferrer">Medium article</a> that states </p>

<blockquote>
  <p>the CPU and RAM resources of all nodes are effectively pooled and managed by the cluster</p>
</blockquote>

<p>and a sentence in a <a href="https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/" rel="nofollow noreferrer">Mirantis blog</a></p>

<blockquote>
  <p>Containers in a Pod share the same IPC namespace, which means they can also communicate with each other using standard inter-process communications such as SystemV semaphores or POSIX shared memory.</p>
</blockquote>

<p>But I can't find anything regarding pods in different nodes having access to the same cache. And these are all on 3rd party sites and not in the official kubernetes site.</p>

<p>I'm expecting the cache to be shared between all pods in all nodes, but I just want confirmation regarding the matter.</p>

<p>No, separate pods do not generally share anything even if running on the same physical node. There are ways around this if you are very very careful and fancy but the idea is for pods to be independent anyway. Within a single pod it's easier, you can use normal shmem, but this is pretty rare since there isn't much reason to do that usually.</p>
