Blue green deployment with namespace segregation. Advice needed

We have an EKS cluster serving a mobile application. We’re considering implementing blue green deployment strategy to minimize downtime and to ease rollbacks.

Is it possible to do a blue green setup with namespace segregation? Any resources that can help with getting started?

What’s your goal in using namespace segregation?

Why would you use namespaces for b/g? Kubernetes has several methods for b/g deployments as is. Seems like you’re adding a lot of unnecessary complexity without knowing all the details.

Nope, it’s not exactly my idea per se. We have an AWS consultant who proposed blue-green approach using namespace segregation. That’s the reason I’m actually asking if it’s possible and what’re the preferred implementation methods.

You could do, and I don’t know your specific use case so it might be fine. However, as mentioned there are a number of controllers that will handle b/g deployments in the same namespace. Not to mention by splitting it to different namespaces you lose some of the advantages that make b/g useful in general.

Here’s our usecase: we have v1 of our app serving customers. Now we have a new version v2 developed that we’d like to deploy.

However we want to test v2 in prod using a restricted set of customers before we open it up to the entire customer base.

This sort of use case sounds more like a reason for feature flags instead of canary deployments. Canary deployments are generally intended for a portion of the traffic, not specific lists of customers. You could accomplish what you’re trying to do by using things like header or cookie-based routing though, which is still something you can do in a single namespace.