Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Redis Service should always point to redis master #20

Open
Rastusik opened this issue Aug 22, 2017 · 2 comments
Open

Redis Service should always point to redis master #20

Rastusik opened this issue Aug 22, 2017 · 2 comments

Comments

@Rastusik
Copy link

Rastusik commented Aug 22, 2017

Hi,

would it be possible to create a mechanism, which would create a redis-master-server service which would always point only to the redis master?

I'm thinking about dynamic labels changing for each redis-server pod... only the master pod would have the redis-master: true label and the redis-master-service would have set its selector to redis-master: true

@Rastusik
Copy link
Author

@gytisgreitai
Copy link

We use haproxy with custom healthcheck for that. But this could probably be simply implemented as a shell script for readiness probe:

    backend bk_redis
      option tcp-check
      tcp-check send PING\r\n
      tcp-check expect string +PONG
      tcp-check send info\ replication\r\n
      tcp-check expect string role:master
      tcp-check send QUIT\r\n
      tcp-check expect string +OK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants