Kubernetes service with clustered PODs in active/standby Kubernetes service with clustered PODs in active/standby kubernetes kubernetes

Kubernetes service with clustered PODs in active/standby


You can use a readiness probe in conjunction with election container. Election will always elect one master from the election pool, and if you make sure only that pod is marked as ready... only that pod will recieve traffic.


One way to achieve this is add label tag in the pod as active and standby. then select the active pod in your service. this will send the traffic to pod labeled as active.

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#service-and-replicationcontroller

you can find another example on this document.

https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/