isn't it obivious, if you create 8 pods in v1 and 2pods in V2. it will route 80% of the traffic to v1. Is there any way to automate this thing? for example, it started with 80-20% and after succesful test it proceed further.
hi Abhishek, Ideally it should route 80% oof the traffic. However, I did find that Kubernetes uses its own algorithm to distribute the traffic. Yes it is possible to automate this. This can be based on checking things like healthcheck endpoint or time bound checks for some metrics like error rates within span of 30 mins or 1 hour etc. Many CI CD tools allow you to progressively increase traffic in steps. Here is an example docs.harness.io/article/2xp0oyubjj-create-a-kubernetes-canary-deployment Istio service mesh allows to specify the traffic increments medium.com/containers-101/fully-automated-canary-deployments-in-kubernetes-70a671105273 Hope this helps.
Nice video with practical demonstration! Can we automate this using single helm chart by having 2 deployment yaml in it? And deploy using azure devops yaml?
hi Jagadeesh, Thanks for appreciation. Yes it should be possible to achieve this using a Helm chart and to trigger the deployment using Azure DevOps or other CI CD platforms like Github actions, Gitlab or Jenkins etc. I have not tried it out. I have couple of videos relatd to Helm and CI CD using GitHUb actions coming soon. Subscribe tot his channel for those. If you are interested you can also raise a pull request to the Cloud Native Ninja series repository by making the necessary changes to deploy the application using Azure DevOps. github.com/NileshGule/cloud-native-ninja
@@nilesh-gule thanks for your reply! I have a doubt… after setting up the flagger can I still use existing nginx virtual server routes(vsr) for route configuration to my deployment workload and do load testing in flagger for progressive rollouts?
The replicas are manually updated to depict the idea of canary deployment, but wn comes to live projects, this isn't the way Canary deployment works i suppose. Tools like kong for canary deployment are used tk provide weightage details on how much traffic should ne routed to v1 and v2
hi Bhavana, you are right. This demo shows how Canary deployment works in Kubernetes. In real life project you would use a CI/CD pipeline to update the Kubernetes release. It can also be done using GitOps. Kong Gateway or Istio service Mesh can be used to change the weightage.
You can refer to this playlist I have covered different deployment strategies including Blue Green deployment, Rolling Updates, Canary Release and Recreate Strategy Kubernetes Deployment Strategies ua-cam.com/play/PLOPXEdTIaFO84i0PNQFOShRMr63OXn797.html
You can keep the pod count to anything as per your application requirement. I took 10 as the count as it is easier to explain. Based on the selector and labels the Kubernetes service will be able to route the traffic to the matching pods.
isn't it obivious, if you create 8 pods in v1 and 2pods in V2. it will route 80% of the traffic to v1. Is there any way to automate this thing? for example, it started with 80-20% and after succesful test it proceed further.
hi Abhishek,
Ideally it should route 80% oof the traffic. However, I did find that Kubernetes uses its own algorithm to distribute the traffic.
Yes it is possible to automate this. This can be based on checking things like healthcheck endpoint or time bound checks for some metrics like error rates within span of 30 mins or 1 hour etc. Many CI CD tools allow you to progressively increase traffic in steps.
Here is an example
docs.harness.io/article/2xp0oyubjj-create-a-kubernetes-canary-deployment
Istio service mesh allows to specify the traffic increments
medium.com/containers-101/fully-automated-canary-deployments-in-kubernetes-70a671105273
Hope this helps.
great!
Glad you found you useful
Wow.. very nice way to explain.... thankyou
Most welcome 😊
Nice video with practical demonstration! Can we automate this using single helm chart by having 2 deployment yaml in it? And deploy using azure devops yaml?
hi Jagadeesh,
Thanks for appreciation. Yes it should be possible to achieve this using a Helm chart and to trigger the deployment using Azure DevOps or other CI CD platforms like Github actions, Gitlab or Jenkins etc. I have not tried it out. I have couple of videos relatd to Helm and CI CD using GitHUb actions coming soon. Subscribe tot his channel for those.
If you are interested you can also raise a pull request to the Cloud Native Ninja series repository by making the necessary changes to deploy the application using Azure DevOps.
github.com/NileshGule/cloud-native-ninja
@@nilesh-gule thanks for your reply! I have a doubt… after setting up the flagger can I still use existing nginx virtual server routes(vsr) for route configuration to my deployment workload and do load testing in flagger for progressive rollouts?
Yes you can do it. The whole purpose of canary deployment is to use it for progressive rollout. Another option is to use the Rolling Updates strategy.
The replicas are manually updated to depict the idea of canary deployment, but wn comes to live projects, this isn't the way Canary deployment works i suppose. Tools like kong for canary deployment are used tk provide weightage details on how much traffic should ne routed to v1 and v2
hi Bhavana,
you are right. This demo shows how Canary deployment works in Kubernetes. In real life project you would use a CI/CD pipeline to update the Kubernetes release. It can also be done using GitOps. Kong Gateway or Istio service Mesh can be used to change the weightage.
Thanks you very much!
You're welcome! Glad that you found it useful
Thank you so much for explanation. Please make video for difference between canary Vs Blue/green deployment.
You can refer to this playlist
I have covered different deployment strategies including Blue Green deployment, Rolling Updates, Canary Release and Recreate Strategy
Kubernetes Deployment Strategies
ua-cam.com/play/PLOPXEdTIaFO84i0PNQFOShRMr63OXn797.html
Hey, do we need to keep pod count as 10 to split traffic between pods?
You can keep the pod count to anything as per your application requirement. I took 10 as the count as it is easier to explain. Based on the selector and labels the Kubernetes service will be able to route the traffic to the matching pods.
@@nilesh-gule Thank You!
Awesome!
Thanks. Glad you found it useful.
Hi Nilesh, thanks for the wonderful explanation. This canary deployment could have also been done using kubectl rollout right?
Yes, you can use kubectl rollout command as well.
Nice video thanks a lot. Could u make a video using ingress such as traefik to control the percentage of traffic? Thanks a lot
Thanks for the suggestion. Will add it to my to do list for upcoming videos
Great video , blue green deployment with lambda services is it possible can you explain how can we achieve
hi Parames,
Let me try this out.