0

We have two etcd clusters running in Kubernetes one act as primary(A) and the second one act as backup(B). We also have etcdctl make-mirror in place between these two clusters, now the problem is if we switch traffic from cluster A to B then cluster B becomes primary, and cluster A becomes the backup cluster. There is an F5 load balancer in front of these two clusters.

I'm looking for a mechanism/trigger that will detect this traffic change and trigger the pipeline which then spins up the replication pod on cluster B and take down the replication pod on the cluster A side.

I'm also open to suggestions about this workflow is there any better way we can achieve two-way replication for etcd? am I missing something?

Sam
  • 101
  • 1
  • Please specify the version of Kubernetes that you use, and if it is bare metal installation or on cloud provider. Additionally, could you please also provide details on how exactly you set up these clusters? – anarxz Jan 27 '22 at 18:35
  • Hello @Sam. Any updates? – Wytrzymały Wiktor Feb 02 '22 at 10:50

1 Answers1

1

Ultimately it will be dependent on your specific choice of CI/CD pipeline and what is responsible for initiating the traffic flip but I did find a demo of F5 using Github actions to trigger config changes when it saw alerting/threshold events from ELK/Splunk stacks.

In your case, if the traffic change was automated, your analytic stack could trigger the alert to a process that calls a Github Action via webook, thus initiating any number of methods, this includes updates to F5 BIG-IP ADC. OR you can have the k8 cluster changes go to BIG-IP via their kubernetes integration.

If you're initiating the traffic failovers from kubernetes or some manual method, then it's a bit easier and you can skip the analytic alerting trigger creation.

Here's the F5 ADC Telemetry-based autoscaling repo that as the setup to do all this. https://github.com/f5devcentral/adc-telemetry-based-autoscaling

You might not be autoscaling BIG-IP but the triggers and event driven changes are what you're looking for.

Chase
  • 409
  • 2
  • 8