Change StatefulSet replica count.

Section: StatefulSets and DaemonSets

Scale statefulset

bash
bash
kubectl scale statefulset postgres --replicas=3 -n data
Explanation

Change StatefulSet replica count.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing StatefulSets and DaemonSets
List statefulsets
Show StatefulSets across namespaces.
OpenIn sheetbashsame section
Describe statefulset
Inspect ordinal pods, PVCs, and update strategy.
OpenIn sheetbashsame section
Watch statefulset rollout
Wait for StatefulSet updates to finish.
OpenIn sheetbashsame section
List daemonsets
Show DaemonSets across namespaces.
OpenIn sheetbashsame section
Describe daemonset
Inspect node coverage and update status.
OpenIn sheetbashsame section
Restart daemonset
Trigger a rolling restart for a DaemonSet.
OpenIn sheetbashsame section