kubernetes/website

StatefulSet Basics - setting update strategy to OnDelete

Open

#47,038 opened on Jun 30, 2024

View on GitHub
 (12 comments) (0 reactions) (3 assignees)HTML (13,918 forks)batch import
help wantedlanguage/ensig/appstriage/accepted

Repository metrics

Stars
 (4,127 stars)
PR merge metrics
 (Avg merge 16d 13h) (160 merged PRs in 30d)

Description

When attempting to run this command:

kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete"}}}'

I receive this message:

The StatefulSet "web" is invalid: spec.updateStrategy.rollingUpdate: Invalid value: apps.RollingUpdateStatefulSetStrategy{Partition:0, MaxUnavailable:(*intstr.IntOrString)(nil)}: only allowed for updateStrategy 'RollingUpdate'

Contributor guide