Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to deploy Keydb:3.6.6 as active-active pod in kubernetes #873

Open
vsomwanshi opened this issue Oct 8, 2024 · 0 comments
Open

Need to deploy Keydb:3.6.6 as active-active pod in kubernetes #873

vsomwanshi opened this issue Oct 8, 2024 · 0 comments

Comments

@vsomwanshi
Copy link

What issue we are facing;

By following this documentation page Active Replication, We have three keydb pods running in my OpenShift cluster with version 3.6.6, but I am not sure which one is the primary, seems any one can be.

Upon accessing the pods and they shows or gives the different value for same-key.

So, this page just supports active-active or master-slave only when the docker containers running on separate nodes or two separate docker container running on same system ? or when the pods are running in two different clusters ?

I have referred few of the documents where they have provided the steps which we can follow to setup the active-active multisite setup https://medium.com/@kedarnath93/keydb-active-active-replication-in-a-multi-site-kubernetes-environment-ff20f7bf9b45.

In our case, what we are searching for is ;

  1. we need to deploy keydb as statefulset, volume attached with 3 pods --- > We have statefulset, configmap ready.
  2. These 3 pods should be in active-active setup and data or values should match in each pod, if any pod goes down it should not impact on our application.

I tried to pass this below argument which will set the replicaof for master node and vice versa but not working as expected.

# Set replica to point to the other pod dynamically
            replica_host="keydb-1.keydb-service.$POD_NAMESPACE.svc.cluster.local";
            if [ "$(hostname)" = "keydb-1" ]; then
              replica_host="keydb-0.keydb-service.$POD_NAMESPACE.svc.cluster.local";
            fi;
            keydb-server /etc/keydb/keydb.conf \
              --bind 0.0.0.0 \
              --port 6379 \
              --active-replica yes \
              --tls-cert-file /etc/ssl/certs/keydb/keydb.crt \
              --tls-key-file /etc/ssl/certs/keydb/keydb.key \
              --tls-ca-cert-file /etc/ssl/certs/keydb/ca.crt \
              --replicaof $replica_host 6379

Even, we tried to run the commands post deployment of pods but still it is not showing the expected value in pods.

@vsomwanshi vsomwanshi changed the title Need to deploy Keydb:3.6.6 as active-active pod setup Need to deploy Keydb:3.6.6 as active-active pod in kubernetes Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant