Kubernetes Blue-green deployment, I am patching the Kubernetes-application-service to redirect the traffic from app-v1 to app-v2(Behind the load balancer). if any connection is ongoing on during that "patching", will be disconnected? and if not !! how I can test this?
what is the best approach as per you for version deployment with the warm handover(without any connection loss) from app-v1 to app-v2?
The question seems to be about supporting two versions at the same time. That is kind of Canary deployment, which make production traffic to gradually shifting from app-v1 to app-v2.
This could be achieved with:
app-v1
and app-v2
.Addition to your question above blue-green deployments. The blue-green deployment is about having two identical environments, where one environment active at a time, let's say blue
is active on production now. Once you have a new version ready for deployment, say green
, is deployed and tested separately. Finally, you switched the traffic to the green environment, when you are happy with the test result on green environment. So green
become active while blue
become idle or terminated later sometime. (Referred from martin fowler article).
In Kubernetes, this can be achieved with having two identical deployments. Here is a good reference.
Basically, you can have two identical deployments, assume you have current deployment my-deployment-blue
is on production. Once you are ready with the new version, you can deploy it as a completely new deployment, lets say my-deployment-green
, and use a separate test service to test the green
environment. Finally, switch the traffic to the my-deployment-green
when all test are passed.