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?
you just need to make a two-container pod, something like this:
containers:
- name: 1st
image: redis
...
- name: 2nd
image: app
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.
apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
containers:
- name: app
image: myapp
- name: redis
image: redis
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.