0

I am experimenting to do a canary release of a service in Openshift. I understand and know how to canary a service if it is registered to a route. But there are situations that we often end up not registering every service with a route. Is there an option to canary a service in OpenShift without a route? Has anyone done it successfully?

P.S: I am looking for a canarying capability that is provided by Istio but unfortunately I cannot use it right now.

zeagord
  • 2,257
  • 3
  • 17
  • 24

1 Answers1

2

There are essentially two main ways that can be taken to achieve canaries without routes.

First would be to simply add new pods behind the same service. As services are essentially round-robin load-balancers, the amount of pods defines the ratio of how many requests will lend on the old deployment or on the canary deployment.

Second way is to deploy some reverse proxy like haproxy or nginx and use it to split the traffic, which is similar to using istio in the sense that you introduce new SW component into your cluster to achieve the goal.

Marek Jelen
  • 794
  • 6
  • 7
  • Is it possible to define the type of load balancing algorithm in service? And define how much traffic that you want to send to a particular pod? – zeagord Apr 12 '18 at 06:49
  • Not that I know of `kube-proxy` (https://kubernetes.io/docs/reference/generated/kube-proxy/) is designed as `simple TCP and UDP stream forwarding or round robin TCP and UDP forwarding across a set of backends`. It can operate in two modes - `iptables` and `userspace` - but both are `round-robin`. The only way would be to hack the current `kube-proxy` or replace it completely, but I would not consider that a solution. – Marek Jelen Apr 12 '18 at 10:10
  • Thanks Marek. Appreciate the response. – zeagord Apr 12 '18 at 13:15