When a “simple” Redis disk resize in Kubernetes turns into a VPN incident: a post-mortem

TL;DR: the short version

On the 2nd of December, 2025 we got an alert that a critical system component (Redis) was running out of disk space. Fixing the capacity issue itself was straightforward. The real trouble started when we tried to “clean things up” afterwards and make the configuration match reality.

Because this component runs in Kubernetes and is set up in a way that doesn’t allow straightforward resource adjustment, we attempted a safe-looking workaround: recreate the controller object without deleting the actual running pods. Kubernetes interpreted that change differently than we expected and restarted the whole Redis cluster. The restart process wasn’t “cautious” enough, it moved too fast and caused the cluster to come back partially degraded. While we were repairing the degraded nodes, a backend service got overwhelmed by reconnect traffic and started failing with out-of-memory errors. After scaling and tuning, the service recovered. Total downtime was ~50 minutes.

What happened

We received an alert that several instances of the Redis cluster were running out of free disk space. But increasing the disk space in our case is associated with certain problems. The thing is, in Kubernetes things such as Redis are usually created via a StatefulSet. It’s specifically designed for workloads that need stable identities and storage.

However, some parts of the StatefulSet are locked, and it can be a problem. StatefulSets define storage via volumeClaimTemplates. Important details:

  • the storage template is effectively locked once created
  • you can’t simply edit it in place to increase disk size

So even if you know exactly what you want, Kubernetes won’t let you change that specific field in the StatefulSet spec.

The immediate fix: increase capacity without restarts

Our storage backend supports online volume expansion. That means we can increase disk capacity underneath a running pod without restarting it.

So we resized the PersistentVolumeClaims (PVCs) directly. This resolved the disk pressure quickly and safely.

But it created a new problem:

  • the declarative configuration (Git + StatefulSet template) was still describing the old disk size
  • the actual PVC/PV state in the cluster now reflected the new disk size

This mismatch is a classic “configuration drift.”

The “cleanup” attempt: make the code match reality

Because the StatefulSet storage template is immutable, the only straightforward way to align the declared state with the real state is to:

  1. Delete the StatefulSet object
  2. Recreate it with the updated storage template

Of course, deleting the StatefulSet normally results in deleting child resources. So we used a Kubernetes trick:

Orphan deletion: “fire the manager, keep the factory running”

We deleted the StatefulSet using orphan / non-cascading deletion. The idea was:

  • Kubernetes forgets the “manager” object…
  • …but the pods (and their disks) stay alive

Then we recreated the StatefulSet so Git and the cluster would be consistent again.

This looked safe — but Kubernetes had a different interpretation.

The unexpected part: Kubernetes restarted the entire Redis cluster

After recreating the StatefulSet, Kubernetes reconciled the workload based on the new spec. Even though the actual disks were already resized, Kubernetes “didn’t know” that all changes had already been applied, so it started the reconciliation process, which resulted in a full Redis cluster restart.

A distributed database/cache cluster can survive a restart sequence, but only if the restart is performed cautiously.

That brings us to the biggest amplifier in this incident.

Why it escalated: restarts were too optimistic

Our restart behavior was not defensive enough:

  • no startup and readiness probes
  • a pod being just “running” was treated as “good enough” (but in reality it still couldn’t handle the actual requests load)
  • Kubernetes proceeded to the next pod too quickly

In plain language: we had a restart process that didn’t really wait for Redis to be healthy before moving on.

At first, this still didn’t look catastrophic: the backend service complained about Redis connections, but overall service graphs didn’t immediately collapse.

Degraded Redis cluster: replicas got “stuck” to old masters

When the dust settled, the Redis cluster came up partially degraded:

  • some replica nodes couldn’t reattach properly
  • they retained stale information about which master they belonged to

At that point, recovery required manual Redis Cluster operations:

  • forgetting obsolete node identities on masters
  • resetting affected replicas
  • re-joining them to the cluster and waiting for the replication catch-up

This procedure took longer than expected. And while it was still in progress, we hit the second-stage failure.

Secondary impact: backend service overload and out-of-memory failures

While Redis nodes were rejoining and syncing, the backend service faced reconnect storms and elevated load. This turned into cascading out-of-memory failures.

Two things made this worse:

  • we initially misattributed which component was actually OOMing
  • scaling the backend service was delayed due to limited spare capacity under current resource constraints

Once the failed component was correctly identified, we stabilized the system by:

  • scaling the backend service
  • increasing memory limits for the affected component
  • …and temporarily relaxing probes to let instances enter the service immediately to smooth the recovery — otherwise it had a cascade effect: once the pod check says that a pod is “ready,” it quickly becomes overloaded with traffic and goes back to “not ready” again. This increases the load on the next pod, the situation repeats, and so on.

After that, the service gradually recovered and the clients’ traffic returned back to normal. Total downtime was appr. 50 minutes: 8:10 UTC - 09:00 UTC

Events timeline

7:00 UTC: disk size was increased in Git
7:05 UTC: the disk size was manually updated for all PVCs in the cluster
7:10 UTC: all pods have finished online disk resizing
8:10 UTC: sts orphan deletion and recreation were performed
8:10-8:15 UTC: Kubernetes quickly performed a full StatefulSet restart. At this moment problems started to appear
8:15-8:35 UTC: manual cluster restoration — replicas recreation & reallocation
8:35-8:50 UTC: dealing with application OOM-errors. Once these problems were mitigated, the service was restored with some limitations (i.e. slow responses)
10:00 UTC: temporary workarounds used for the emergency relaunch of the service were reverted. The service is fully restored and operational now

Lessons learnt

1) It wasn’t disk resize that caused the incident
The capacity fix was straightforward. The incident started with the state alignment step and the controller recreation.

2) Immutable fields push you toward risky workflows
When the system won’t let you edit a field, the workaround often involves replacement — and that replacement can trigger wide reconciliation behavior.

3) Startup probes and strict readiness are not just “nice to have”
They’re the brakes on a rolling restart. Without them, distributed systems restart in the most fragile way possible. This is the worst part of this incident — having probes would have not allowed Kubernetes to restart the next pod until the current one is really ready.

4) Recovery plans must assume slow cluster healing
Rejoins and replication catch-ups take time. Dependent services need to be designed to degrade gracefully during that window.

What are we going to do?

1) Implement missing startup probes
Simple startup probes like “do not mark the pod as ‘ready’ until the dataset is loaded” will prevent this situation from happening again.

2) Make our own “control plane” for Redis
This is a more complex thing, but it is very helpful in a situation when a restarted pod is “stuck” to an old master IP address.

3) Decrease dependency on this Redis cluster
As of now, it looks like Redis-cluster is the SPOF (single point of failure) for the whole service, so we are planning to migrate some important information to other data sources — like a separate Redis cluster for each server. We also plan to start using Kafka for some of the backend’s components.

Thích bài viết này?
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Windows

Sử dụng bất kỳ trình duyệt hoặc ứng dụng nào và không bao giờ phải lo lắng về tình trạng ẩn danh của bạn nữa. Toàn bộ thế giới nằm trong tầm tay bạn với AdGuard VPN.
TẢI XUỐNG
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Màn hình chính của AdGuard VPN cho Windows với kết nối VPN đang hoạt động.
Màn hình chính của AdGuard VPN dành cho Windows hiển thị trạng thái đã ngắt kết nối.
Màn hình Loại trừ với danh sách các trang web không sử dụng VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Mac

Chỉ với hai cú nhấp chuột, hãy chọn một thành phố từ bất kỳ nơi nào trên thế giới — chúng tôi có hơn 75 vị trí — và dữ liệu của bạn sẽ vô hình với những con mắt tò mò.
TẢI XUỐNG
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Màn hình chính của AdGuard VPN dành cho Mac với kết nối VPN đang hoạt động.
Màn hình chính của AdGuard VPN cho Mac hiển thị trạng thái đã ngắt kết nối.
Màn hình Loại trừ với danh sách các trang web không sử dụng VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Android

AdGuard VPN cho Android cung cấp hàng chục vị trí tốc độ cao. Trình duyệt riêng tư hơn khi đang di chuyển. Chặn quảng cáo và trình theo dõi bằng tính năng Bảo Vệ Theo Dõi tích hợp
Tìm hiểu thêm
TẢI XUỐNG
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Có sẵn trên Google Play
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Màn hình chính của AdGuard VPN dành cho Android với kết nối VPN đang hoạt động.
Màn hình chính của AdGuard VPN dành cho Android hiển thị trạng thái đã ngắt kết nối.
Màn hình Vị trí hiển thị các máy chủ khả dụng nhanh nhất.
Màn hình Loại trừ với danh sách các trang web không sử dụng VPN.
Màn hình có mã QR để cài đặt AdGuard VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho iOS

Bảo vệ sự riêng tư của bạn và phát trực tuyến các chương trình yêu thích một cách ẩn danh với AdGuard VPN cho iOS. Chặn quảng cáo bằng tính năng Bảo Vệ Theo Dõi tích hợp sẵn
Tìm hiểu thêm
Có sẵn trên App Store
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Màn hình chính của AdGuard VPN dành cho iOS với kết nối VPN đang hoạt động.
Màn hình chính của AdGuard VPN dành cho iOS hiển thị trạng thái đã ngắt kết nối.
Màn hình Vị trí hiển thị các máy chủ khả dụng nhanh nhất.
Màn hình Loại trừ với danh sách các trang web không sử dụng VPN.
Màn hình có mã QR để cài đặt AdGuard VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Android TV

Khám phá AdGuard VPN cho Android TV! Tận hưởng khả năng phát trực tuyến liền mạch, bảo mật nâng cao và thiết lập dễ dàng.
TẢI XUỐNG
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Có sẵn trên Google Play
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Màn hình chính của AdGuard VPN dành cho Android TV với kết nối VPN đang hoạt động tới một máy chủ ở Helsinki, Phần Lan.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Chrome

AdGuard VPN cho Edge

AdGuard VPN cho Firefox

AdGuard VPN cho Opera

Ẩn vị trí thực sự của bạn và xuất hiện từ một nơi khác trên thế giới - truy cập bất kỳ nội dung nào mà không có giới hạn tốc độ và bảo vệ tính ẩn danh trên web của bạn.
Đến một vị trí khác chỉ bằng một cú nhấp chuột, ẩn IP của bạn và giúp bạn lướt web an toàn và ẩn danh.
Bảo vệ quyền riêng tư của bạn, ẩn vị trí thực của bạn và quyết định nơi bạn cần VPN và nơi bạn không!
Trở thành ninja trong trình duyệt Opera của bạn: di chuyển nhanh chóng đến bất kỳ nơi nào trên thế giới mà vẫn không bị chú ý.
Cài đặt
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Cài đặt
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Cài đặt
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Cài đặt
Bằng cách tải xuống chương trình, bạn chấp nhận các điều khoản của Thỏa thuận cấp phép
Tìm hiểu thêm
Màn hình chính của tiện ích mở rộng trình duyệt AdGuard VPN với kết nối VPN đang hoạt động.
Màn hình Vị trí hiển thị các máy chủ khả dụng nhanh nhất.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho bộ định tuyến

Cài đặt AdGuard VPN trên bộ định tuyến của bạn để bảo mật toàn bộ mạng của bạn. Quyết định thiết bị nào cần bảo vệ và khi nào
Tùy chọn này chỉ khả dụng với Đăng kí AdGuard VPN
Một bộ định tuyến có biểu tượng chiếc khiên với lỗ khóa.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Linux

Nhận VPN miễn phí tốt nhất cho Linux và tận hưởng việc lướt web mượt mà, bảo mật được nâng cao, mã hóa lưu lượng Internet và bảo vệ rò rỉ DNS. Chọn từ nhiều máy chủ VPN và truy cập các vị trí bạn muốn
Linh vật Tengu của AdGuard VPN cùng chú chim cánh cụt Tux của Linux đang ngồi trong bụi cây.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Apple TV

Khám phá AdGuard VPN cho Apple TV! Tận hưởng khả năng phát trực tuyến liền mạch, bảo mật nâng cao và thiết lập dễ dàng
Tùy chọn này chỉ khả dụng với Đăng kí AdGuard VPN
Thiết bị phát trực tuyến Apple TV có logo AdGuard VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Xbox

Bảo vệ Xbox của bạn với AdGuard VPN và tận hưởng trò chơi trực tuyến liền mạch, bảo mật nâng cao và thiết lập dễ dàng
Tùy chọn này chỉ khả dụng với Đăng kí AdGuard VPN
Máy chơi game Microsoft Xbox và tay cầm có logo AdGuard VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho PS4/PS5

Bảo vệ PlayStation của bạn với AdGuard VPN và tận hưởng trò chơi trực tuyến liền mạch, bảo mật nâng cao và thiết lập dễ dàng. Chọn từ nhiều máy chủ VPN và truy cập các vị trí bạn muốn
Tính năng này chỉ khả dụng với đăng ký AdGuard VPN
Tùy chọn này chỉ khả dụng với Đăng kí AdGuard VPN
Máy chơi game Sony PlayStation và tay cầm có logo AdGuard VPN.
9.332 9332 đánh giá của người dùng
Tuyệt vời!

AdGuard VPN cho Chromecast

Cài đặt AdGuard VPN trên Google TV của bạn (Chromecast Gen 4) hoặc trên bộ định tuyến mạng của bạn (Chromecast Gen 3) và tận hưởng việc phát trực tuyến nội dung với Chromecast trong khi giữ ẩn danh trực tuyến và truy cập nội dung từ bất kỳ đâu. Đối với Chromecast Gen 3, bạn cần một gói đăng ký AdGuard VPN
Tùy chọn này chỉ khả dụng với Đăng kí AdGuard VPN
Thiết bị phát trực tuyến Google Chromecast có biểu tượng hình khiên với lỗ khóa.
AdGuard VPN
quá trình tải xuống bắt đầu
Nhấp vào nút có hình mũi tên để bắt đầu cài đặt.
Quét để cài đặt AdGuard VPN trên thiết bị di động của bạn
Màn hình có mã QR để cài đặt AdGuard VPN.