A step-by-step guide to setting up rolling deployments on Kubernetes using CircleCI. Covers writing Kubernetes manifests with maxSurge and maxUnavailable for zero-downtime deploys, building and pushing Docker images via CircleCI pipelines, adding deploy markers for visibility in the Deploys dashboard, monitoring rollouts with kubectl, troubleshooting common issues like stuck rollouts and CrashLoopBackOff, and setting up an automated rollback pipeline triggered from the CircleCI dashboard. Also discusses when rolling deployments are appropriate versus blue-green or canary strategies.
Table of contents
This tutorial covers:PrerequisitesHow rolling deployments work in KubernetesStep 1 — Build and containerize the sample applicationStep 2 — Write the Kubernetes manifestsStep 3 — Create the CircleCI pipelineStep 4 — Add deploy markers for visibilityStep 5 — Trigger a rolling updateVerifying and troubleshooting the rolloutStep 6 — Set up a rollback pipelineWhen to use rolling deployments (and when not to)ConclusionSort: