<p>How do I clear old deployments? I'm able shrink a deployment to 0 replicas via <code>kubectl scale deployment.v1.apps/hello-kubernetes3 --replicas=0</code>, but as shown below they're still present in some form.</p>
<pre><code>$ kubectl get rs -o wide
NAME                           DESIRED   CURRENT   READY   AGE   CONTAINERS         IMAGES                            SELECTOR
hello-kubernetes-5cb547b7d     1         1         1       27m   hello-kubernetes   paulbouwer/hello-kubernetes:1.8   app=hello-kubernetes,pod-template-hash=5cb547b7d
hello-kubernetes-6d9fd679cd    0         0         0       32m   hello-kubernetes   paulbouwer/hello-kubernetes:1.8   app=hello-kubernetes,pod-template-hash=6d9fd679cd
hello-kubernetes3-6d9fd679cd   0         0         0       25m   hello-kubernetes   paulbouwer/hello-kubernetes:1.8   app=hello-kubernetes,pod-template-hash=6d9fd679cd
</code></pre>

Mr.UNOwen
<p>This is a community wiki answer as a part of it would be based on @meaningqo comment but I would like to share some more light on this topic with a help of the official documentations.</p>
<p>What you were doing in the first place is not deleting a deployment but actually scaling it to 0. In order to delete a deployment or any other resource you should use the <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#delete" rel="nofollow noreferrer">kubectl delete command</a>:</p>
<blockquote>
<p>Delete resources by filenames, stdin, resources and names, or by
resources and label selector.</p>
<p>JSON and YAML formats are accepted. Only one type of the arguments may
be specified: filenames, resources and names, or resources and label
selector.</p>
</blockquote>
<p>Note that:</p>
<blockquote>
<p>Some resources, such as pods, support graceful deletion. These
resources define a default period before they are forcibly terminated
(the grace period) (...) Because these resources often represent
entities in the cluster, deletion may not be acknowledged immediately.</p>
</blockquote>
<p>So you may want to wait a bit before seeing the results.</p>
<p>Referring to your second question. There are also other options aimed to work with <code>ReplicaSets</code> specifically:</p>
<ul>
<li><p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#deleting-a-replicaset-and-its-pods" rel="nofollow noreferrer">Deleting a ReplicaSet and its Pods</a></p>
</li>
<li><p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#deleting-just-a-replicaset" rel="nofollow noreferrer">Deleting just a ReplicaSet</a></p>
</li>
</ul>
<p>I also recommend familiarizing yourself with the whole <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/" rel="nofollow noreferrer">ReplicaSet guide</a> for better understanding of this particular topic.</p>
