Back to articles
Zero-Downtime Deployments on Kubernetes: Rolling Updates, Blue-Green, and Canary
How-ToDevOps

Zero-Downtime Deployments on Kubernetes: Rolling Updates, Blue-Green, and Canary

via Dev.to TutorialYoung Gao

Zero-Downtime Deployments on Kubernetes: Rolling Updates, Blue-Green, and Canary Deploying without downtime isn't just about setting strategy: RollingUpdate . It's about health checks that actually verify readiness, connection draining that doesn't drop requests, and rollback triggers that catch problems before users do. Here's how to set up each deployment strategy correctly on Kubernetes. The Basics: Why Deployments Fail Most "zero-downtime" deployments still drop requests because of three mistakes: Readiness probes that lie — returning 200 before the app can serve traffic No graceful shutdown — pods killed mid-request Missing preStop hooks — pod removed from service before in-flight requests complete Rolling Update (Default) Rolling updates replace pods incrementally. Kubernetes creates new pods before terminating old ones. # deployment.yaml apiVersion : apps/v1 kind : Deployment metadata : name : api-server spec : replicas : 4 strategy : type : RollingUpdate rollingUpdate : maxSurg

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles