k8s-rwo-deployment-recreate-strategy

Configure Kubernetes Deployments with Recreate strategy to resolve ReadWriteOnce PVC deadlocks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/aldengolab/lorist --skill k8s-rwo-deployment-recreate-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-rwo-deployment-recreate-strategy
Source: https://github.com/aldengolab/lorist/tree/main/skills/k8s-rwo-deployment-recreate-strategy
Command: npx skills add https://github.com/aldengolab/lorist --skill k8s-rwo-deployment-recreate-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fixes deadlocks that occur when a single-replica Kubernetes Deployment uses a ReadWriteOnce PVC during rolling updates. The new pod cannot start because the old pod holds the volume, and the old pod often won't terminate due to maxUnavailable. Also covers the secondary error 'spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is Recreate' when patching a live Deployment.

Core Features & Use Cases

  • Set Recreate strategy in Helm values in order to avoid RollingUpdate conflicts during upgrades.
  • Provide a safe, delete-and-recreate workflow when live deployments still expose rollingUpdate fields.
  • Verify the applied strategy and understand the downtime trade-off for single-replica stateful apps.

Quick Start

Set the deployment to Recreate and verify a successful upgrade to prevent deadlocks.

Frequently Asked Questions about k8s-rwo-deployment-recreate-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is my Kubernetes deployment stuck in Init:0/1 or Pending with multi-attach errors?

A single-replica Kubernetes deployment using a ReadWriteOnce PVC deadlocks during rolling updates because the new pod cannot mount the volume while the old pod holds it. The old pod often refuses to terminate due to maxUnavailable constraints.

How do I fix the 'spec.strategy.rollingUpdate: Forbidden' error when patching a live Kubernetes Deployment?

This error occurs when patching a live Deployment that still exposes rollingUpdate fields with a Recreate strategy. You must follow a safe delete-and-recreate workflow to remove the live resource and apply the new configuration cleanly.

How do I configure a Recreate deployment strategy for single-replica stateful apps in Helm?

Set the deployment strategy to Recreate directly in your Helm values to avoid RollingUpdate conflicts during upgrades. This ensures the old pod terminates before the new pod starts, preventing PVC multi-attach deadlocks.

What is the trade-off of using the Recreate strategy for single-replica Kubernetes deployments?

Using the Recreate strategy for single-replica deployments introduces downtime because the existing pod must terminate before the new pod initializes. This trade-off is necessary to release ReadWriteOnce PVCs and prevent update deadlocks.

When do I need to use a delete-and-recreate workflow for Kubernetes deployments?

You need a delete-and-recreate workflow when a live Kubernetes deployment exposes rollingUpdate fields that conflict with a Recreate strategy, preventing direct patching. This path safely removes the old resource to apply the new strategy configuration.