Scaling StatefulSets :
kubectl get statefulsets <stateful-set-name>
kubectl scale statefulsets <stateful-set-name> --replicas=<new-replicas>
Make in-place updates on your StatefulSets
-
Alternatively, you can do in-place updates on your StatefulSets.
-
If your StatefulSet was initially created with kubectl apply, update .spec.replicas of the StatefulSet manifests, and then do a kubectl apply:
kubectl apply -f <stateful-set-file-updated>
kubectl edit statefulsets <stateful-set-name>
kubectl patch statefulsets <stateful-set-name> -p '{"spec":{"replicas":<new-replicas>}}'