<p>I have a StatefulSet with 2 pods. It has a headless service and each pod has a LoadBalancer service that makes it available to the world. </p>

<p>Let's say pod names are pod-0 and pod-1. </p>

<p>If I want to delete pod-0 but keep pod-1 active, I am not able to do that. </p>

<p>I tried</p>

<pre><code>kubectl delete pod pod-0
</code></pre>

<p>This deletes it but then restarts it because StatefulSet replica is set to 2. </p>

<p>So I tried</p>

<pre><code>kubectl delete pod pod-0
kubectl scale statefulset some-name --replicas=1
</code></pre>

<p>This deletes pod-0, deletes pod-1 and then restarts pod-0. I guess because when replica is set to 1, StatefulSet wants to keep pod-0 active but not pod-1. </p>

<p>But how do I keep pod-1 active and delete pod-0?</p>

<p>This is not supported by the StatefulSet controller. Probably the best you could do is try to create that pod yourself with a sleep shim and maybe you could be faster. But then the sts controller will just be unhappy forever.</p>
