Worker Pools and Blue Green Clusters (not deployments)

We are setting up Blue/Green Kubernetes clusters. Basically I have two sets of Deployment Targets. One for the blue cluster and one for the green cluster.

When it is time to switch clusters, I use the API to swap the roles on the the deployment targets so that the incoming cluster gets all the deployments. I then use the API to redeploy the latest deployments to each environment for each tenant. This seems to work well.

My problem is for steps that use a worker. Just like my Deployment Targets, I have two sets of Worker Pools (and workers inside the pools), one for the Green cluster and One for the Blue cluster. But there is nothing like “roles” for workers. So I can’t change the workers for the a deployment

There is the ability to set the pool via a variable, but that variable is snapshot at Release creation time. So if I create a release with the variable set to the Blue Workers, then swap my the Green cluster in as the active cluster, when I go to deploy next, the variable is set to the wrong worker group (Blue). When it goes to run, there will not be any healthy workers in that group.

Is there a way I can get worker pools (and workers) working like Deployment Targets (where I can swap them out as needed)?

I figured a way around this. (I decided to post it here rather than just delete the question.)

I just make a common WorkerPool and when I swap clusters, I use the API to empty it out (by removing all the workers in the that pool) and then I fill it up with the Workers created on the new cluster.

1 Like

Hey @OctopusSchaff,

Thanks for letting us know you managed to figure out a way that works for you and for posting it here.

Feel free to get back in touch if you run into any further issues with this topic!

Kind Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.