---
title: "Advanced Rollout Techniques: Custom Strategies for Stateful Apps in Kubernetes"
description: "Slack built the Bedrock Rollout Operator, a Kubebuilder-based Kubernetes operator that drives StatefulSet rollouts through a StatefulsetRollout custom resource."
url: "https://swe.quest/articles/advanced-rollout-techniques-custom-strategies-for-stateful-apps-in-kubernetes-a422eb29cf5ed2f0"
canonical: "https://slack.engineering/kube-stateful-rollouts/"
source: "Slack Engineering"
published: "2024-06-15"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["kubernetes","deployment","go"]
---

# Advanced Rollout Techniques: Custom Strategies for Stateful Apps in Kubernetes

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2024-06-15, 10 min read, Case study. Original: [https://slack.engineering/kube-stateful-rollouts/](https://slack.engineering/kube-stateful-rollouts/)

## Summary

Slack built the Bedrock Rollout Operator, a Kubebuilder-based Kubernetes operator that drives StatefulSet rollouts through a StatefulsetRollout custom resource. It runs StatefulSets with the OnDelete strategy, which gives percent-based phases, parallel Pod evictions bounded by the PodDisruptionBudget, pause, Consul health checks, Slack notifications and callbacks to the deploy system. RollingUpdate's one-Pod-at-a-time pace was too slow, and StatefulSet maxUnavailable is unavailable on EKS. Instead of event-driven watches, the reconcile loop takes one action per pass, stores the phase in the resource status, and re-enqueues itself, which avoids races and keeps each pass fast. Lessons include notification rate limits on 1,000-Pod StatefulSets, fixed by batching 50 Pods per message, and a "version leak": a paused partial rollout drifts toward the new version as nodes get replaced.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Go](https://swe.quest/tags/go.md) (Languages)

## Prerequisites

- Kubernetes StatefulSets ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Kubernetes operators and controllers ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Pod disruption budgets

## Keywords

Kubebuilder, StatefulSet, Bedrock, Consul, Block Kit, Amazon EKS, Argo Rollouts, OpenKruise

## Related posts

- [Make Before Break - Faster Scaling Mechanics for ClickHouse Cloud](https://swe.quest/articles/make-before-break-faster-scaling-mechanics-for-clickhouse-cloud-160bec81b6592a0e.md): ClickHouse · 2025-04-02 · Medium · 17 min read · Kubernetes, Scaling, Deployment, Scheduling, Analytics & OLAP
  ClickHouse Cloud replaced rolling-restart vertical scaling with Make-Before-Break (MBB) scaling: new, correctly sized replicas are added before old ones are removed.
- [Executing Cron Scripts Reliably At Scale](https://swe.quest/articles/executing-cron-scripts-reliably-at-scale-300d2911de10f9b3.md): Slack Engineering · 2023-09-28 · Medium · 5 min read · Scheduling, System design, Kubernetes, Go, Queues & messaging
  Slack replaced a single cron box running all scripts from one crontab with a distributed cron execution service built mostly from existing infrastructure.
- [Avoiding Kubernetes Pod Topology Spread Constraint Pitfalls](https://swe.quest/articles/avoiding-kubernetes-pod-topology-spread-constraint-pitfalls-e98998a6a64fb2aa.md): Wise Engineering · 2023-03-28 · Medium · 6 min read · Kubernetes, Scheduling, Resilience, Deployment
  Kubernetes Pod Topology Spread Constraints with a naive LabelSelector (e.g. just the app label) can produce heavy zone skew during rolling updates, because kube-scheduler counts Pods from both old and new ReplicaSets and never rebalances when old Pods are randomly terminated.
- [Continuous Load Testing](https://swe.quest/articles/continuous-load-testing-cb6889189cd6bc8f.md): Slack Engineering · 2022-04-29 · Medium · 13 min read · Testing, Performance engineering, Resilience, Kubernetes, Deployment
  Slack moved to running its Koi Pond load-testing clients continuously, 24/7, against an organization 4x the size of its largest customer.
- [BuildRock: A Build Platform at Slack](https://swe.quest/articles/buildrock-a-build-platform-at-slack-c8b3b87d529426f6.md): Slack Engineering · 2022-08-31 · Medium · 10 min read · CI/CD, Kubernetes, Infrastructure as code, Build systems, Developer productivity
  Slack consolidated its sprawling, hand-managed "snowflake" Jenkins clusters into BuildRock, a build-as-a-service platform.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
