1

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.
  • 369
  • 4
  • 15

1 Answers1

0

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
  • 41
  • 4
  • Thank you jonas for your answer. I have not used deployments with spinnaker yet: still trying to get it to work with replicasets with 1 replica, so that doesn't seem to be it ... Spinnaker uses "load-balancer-X:true" as the service's selector, and toggles the value of the pods label to enable/disable them; It feels weird to me to bring flannel & multiple nets to the table since in theory it could be done by updating the service's selector instead of the pods label – Mehdi. May 01 '17 at 03:14