How to run pod with existing statefulset in kubernetes cluster?

4/11/2019

I used this command to start my statefulset:

kubectl scale statefulset my-set --replicas=1

But pod is not running.

How could I start pod with existing stateful set "my-set"?

-- Janis Karklins
kubernetes
kubernetes-statefulset
scale

1 Answer

4/11/2019

You can scale a statefulset in different ways:

kubectl scale --replicas=1 statefulset/my-set

kubectl scale sts my-set --replicas=1

kubectl patch sts my-set -p '{"spec":{"replicas":1}}'
-- victortv
Source: StackOverflow