Using spinnaker's Red/Black deployments strategy and still having both versions serving traffic

4/22/2017

I'm currently setting up a POC spinnaker pipeline to deploy to a kubernetes cluster.

Experimenting with spinnaker's red/black strategy, i've noticed that it does not behave as i expect it to. I expect it to guarantee that only 1 version gets traffic with the following steps:

  1. deploy black server group (kubernete's replicaset) & ensure it's healthy
  2. reroute the traffic of the service to the black server group by updating the load balancer's targets
  3. disable the red server group

But in reality, at least when using it with kubernetes, step 2 here seems to map to several steps:

  • add black targets to the load balancer
  • remove red targets from the load balancer

Therefore, i get 2 versions serving traffic for a minute here.

To my understanding, blue green can be achieved in kubernetes by updating the service (load balancer) 's pods selector, so i'm confused as for why spinnaker's kubernetes driver does not seem to leverage this.

Can anybody help me see what i'm missing here ?

Thanks

-- Mehdi.
blue-green-deployment
kubernetes
spinnaker

1 Answer

4/26/2017

Can you verify if the deployment isn't still in the phase of rolling out? It can be that your spinacker setup just spins up a new version of the current deployment. If this is the case your deployment will doe a rolling upgrade withe the max surge you provided or the default one and that's why you have 2 versions running at the same time.

If I'm not mistaken, most of the people that doe blue/green deploys have 2 separated networks (for example with flannel) and just spin up a new deployment that gets switched either gradually or instant via their ingress controllers.

-- jonas kint
Source: StackOverflow