finds.dev← search

// the find

ContainerSolutions/k8s-deployment-strategies

★ 3,653 · Go · updated Apr 2024

Kubernetes deployment strategies explained

A reference collection of working Kubernetes manifests for six deployment strategies — recreate, rolling, blue/green, canary, A/B, and shadow — each with Prometheus/Grafana instrumentation to watch traffic shift in real time. Aimed at engineers who learn better from running examples than from blog posts. The Go app is just a version-tagged HTTP server used as a dummy target.

Each strategy gets its own directory with copy-paste-ready YAML and a per-strategy README that explains the tradeoffs, not just the commands. Canary is covered three ways — native Kubernetes, nginx-ingress annotations, and Istio VirtualService — which is genuinely useful for teams with different ingress setups. The Grafana dashboard JSON is included so you can see request rates split by version without building a panel from scratch. The decision diagram is a clean flowchart for picking a strategy under real constraints.

Last commit was April 2024 and the manifests are pinned to Kubernetes 1.25 — Gateway API has since become stable and Istio examples still use the deprecated v1alpha1 VirtualService CRDs that will break on current Istio. There is no Argo Rollouts coverage despite that being the dominant tool for canary and blue/green in production today; the native-Kubernetes canary example requires manual replica math which nobody does at scale. The blue/green example switches traffic by manually editing the Service selector, which is fine for a demo but the README doesn't acknowledge that you'd automate this with a script or operator in any real deployment.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →