<p>I am looking to implement Redis Cache for a number of web applications in Kubernetes, but am not sure how exactly to architect the Redis Cache part.</p>
<p>I was thinking that if I have 5 replicas of my application, they could all use a single Redis Cache in a separate pod, as I wanted to avoid using a sidecar container for each application pod. Then for each application, they have their own Redis Cache Deployment in Kubernetes, and the application connects to this (by a service I guess).</p>
<p>Does this sound like a suitable plan?
How does the application talk to the Redis Cache pod, do I need to expose it via a Service?
I've seen that you should co-locate your Redis Cache and Application on the same node, is this a concern, and is there a way to do this?</p>

Josh Wright
<p>With <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a> you can easily install redis on your cluster using the <a href="https://github.com/bitnami/charts/tree/main/bitnami/redis" rel="nofollow noreferrer">bitnami chart</a>.
Or i prefer to install a <a href="https://github.com/ot-container-kit/redis-operator" rel="nofollow noreferrer">redis</a> <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/" rel="nofollow noreferrer">operator</a> an let it do the magic.</p>
<p>Either way, you can install one or multiple redis on your kubernetes cluster and they will be accessible through a kubernetes service at something like <code>http://my-redis-service.cool-namespace.svc.cluster.local:6379</code>.</p>
<p>There is no need to co-host redis on the same node, that's where kubernetes does the work.</p>
