<p>I have a Cassandra/Kubernetes cluster on GCP</p>
<pre><code>manuchadha25@cloudshell:~ (copper-frame-262317)$ kubectl get statefulsets --all-namespaces                                                                                                        
NAMESPACE       NAME                       READY   AGE
cass-operator   cluster1-dc1-default-sts   3/3     2d9h
manuchadha25@cloudshell:~ (copper-frame-262317)$ kubectl get all -n cass-operator                                                                                                                 
NAME                                 READY   STATUS    RESTARTS   AGE
pod/cass-operator-5f8cdf99fc-9c5g4   1/1     Running   0          2d9h
pod/cluster1-dc1-default-sts-0       2/2     Running   0          2d9h
pod/cluster1-dc1-default-sts-1       2/2     Running   0          2d9h
pod/cluster1-dc1-default-sts-2       2/2     Running   0          2d9h

NAME                                          TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)             AGE
service/cass-operator-metrics                 ClusterIP      10.51.243.147   &lt;none&gt;          8383/TCP,8686/TCP   2d9h
service/cassandra-loadbalancer                LoadBalancer   10.51.240.24    34.91.214.233   9042:30870/TCP      37h
service/cassandradatacenter-webhook-service   ClusterIP      10.51.243.86    &lt;none&gt;          443/TCP             2d9h
service/cluster1-dc1-all-pods-service         ClusterIP      None            &lt;none&gt;          &lt;none&gt;              2d9h
service/cluster1-dc1-service                  ClusterIP      None            &lt;none&gt;          9042/TCP,8080/TCP   2d9h
service/cluster1-seed-service                 ClusterIP      None            &lt;none&gt;          &lt;none&gt;              2d9h

NAME                            READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/cass-operator   1/1     1            1           2d9h

NAME                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/cass-operator-5f8cdf99fc   1         1         1       2d9h

NAME                                        READY   AGE
statefulset.apps/cluster1-dc1-default-sts   3/3     2d9h
manuchadha25@cloudshell:~ (copper-frame-262317)$
</code></pre>
<p>I want to scale it down from 3 nodes to 2 nodes. I am tried running the following commands but both failed.</p>
<pre><code>manuchadha25@cloudshell:~ (copper-frame-262317)$ kubectl scale statefulsets cluster1-dc1-default-sts --replicas=2
Error from server (NotFound): statefulsets.apps &quot;cluster1-dc1-default-sts&quot; not found
</code></pre>
<p>What is the right command to scale down cluster?</p>

Manu Chadha
<p>Use <code>-n</code> parameter to specify correct <code>namespace</code> where the <code>statfulset</code> is deployed. Without the <code>namespace</code> it's trying to delete from <code>default</code> namespace where the <code>statfulset</code> <code>cluster1-dc1-default-sts</code> does not exist.</p>
<pre><code>kubectl scale statefulsets cluster1-dc1-default-sts --replicas=2 -n cass-operator
</code></pre>
