Home > Blockchain >  How to link different microservices in one namespace to different redis in another namespace?
How to link different microservices in one namespace to different redis in another namespace?

Time:01-24

I have 10 microservices and I want to attach each microservice to different redis in order to make a different redis for each microservice. I can't figure out how to implement it or is it possible to make one of the two containers better?. Maybe there is an example of such manifests for redis?

CodePudding user response:

If you want just a single node deployment of Redis, and you don't care about high availability you can use this manifest: https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/kubernetes-manifests/redis.yaml

If you are interested in having a Redis cluster with high availability and failover, you need to take a look into, if you don't want to manage the cluster yourself (up until one point though): https://github.com/spotahome/redis-operator or you can simply go and use a statefulset and have full control over the cluster setup: https://github.com/bdimcheff/rediskube/blob/master/redis-statefulset.yaml .

Edit: Also, you have the option to use a Helm chart to deploy your Redis cluster using https://github.com/bitnami/charts/tree/main/bitnami/redis/#installing-the-chart . If you install the release without customising chart's values you will have a Redis cluster with the default values provided in the chart.

  • Related