I have a need to run two services within a container/POD …
1. An App
2. Redis - the App uses it
Is it possible, say by making the Redis a Sidecar?
I have a need to run two services within a container/POD …
1. An App
2. Redis - the App uses it
Is it possible, say by making the Redis a Sidecar?
2
Answers
you just need to make a two-container pod, something like this:
You can make it if you want to tie the lifecycle of redis with single instance of your app. You just need to create a pod with multiple containers. You can access redis on
localhost
from your app if they are running in same pod.https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/#creating-a-pod-that-runs-two-containers
Your question sounds more like an XY problem. Why not make redis as a separate pod and access it via a service? That way you can scale your app independently.