<p>I have a Kubernetes cluster installed in my Ubuntu machines. It consists of three machines: one master/node and two nodes.</p>

<p>When I turn down the cluster, it never stops printing "waiting for tearing down pods":</p>

<pre><code>root@kubernetes01:~/kubernetes/cluster# KUBERNETES_PROVIDER=ubuntu ./kube-down.sh
Bringing down cluster using provider: ubuntu
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
No resources found
No resources found
service "kubernetes" deleted
No resources found
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
waiting for tearing down pods
</code></pre>

<p>There is no pods nor services running when I turn it down. Finally, I have to force stop by killing processes and stoping services.</p>

<p><strong>First we have to find out which rc is running :</strong></p>

<p>kubectl get rc --namespace=kube-system </p>

<p><strong>We have to delete Running rc :</strong></p>

<p>kubectl delete  rc <strong>above_running_rc_name</strong> --namespace=kube-system </p>

<p>Then cluster down script "KUBERNETES_PROVIDER=ubuntu ./kube-down.sh", will execute <strong>without Error</strong> "<strong>waiting for tearing down pods</strong>"</p>

<p><strong>EXAMPLE ::</strong></p>

<p>root@ubuntu:~/kubernetes/cluster# <strong>KUBERNETES_PROVIDER=ubuntu ./kube-down.sh</strong> </p>

<p>Bringing down cluster using provider: ubuntu
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)</p>

<p>No resources found
No resources found
service "kubernetes" deleted
No resources found</p>

<p><strong>waiting for tearing down pods</strong></p>

<p><strong>waiting for tearing down pods</strong></p>

<p>^C</p>

<p>root@ubuntu:~/kubernetes/cluster# <strong>kubectl get rc --namespace=kube-system</strong>
CONTROLLER                    CONTAINER(S)           IMAGE(S)                                                     SELECTOR                       REPLICAS   AGE
<strong>kubernetes-dashboard-v1.0.1</strong>   kubernetes-dashboard   gcr.io/google_containers/kubernetes-dashboard-amd64:v1.0.1   k8s-app=kubernetes-dashboard   1          44m
root@ubuntu:~/kubernetes/cluster# </p>

<p>root@ubuntu:~/kubernetes/cluster# <strong>kubectl delete rc kubernetes-dashboard-v1.0.1 --namespace=kube-system</strong>
replicationcontroller "kubernetes-dashboard-v1.0.1" deleted</p>

<p>root@ubuntu:~/kubernetes/cluster# <strong>KUBERNETES_PROVIDER=ubuntu ./kube-down.sh</strong> </p>

<p>Bringing down cluster using provider: ubuntu
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)</p>

<p>No resources found
No resources found
service "kubernetes" deleted
No resources found
Cleaning on master 172.27.59.208
26979</p>

<p>etcd stop/waiting
Connection to 172.27.59.208 closed.
Connection to 172.27.59.208 closed.
Connection to 172.27.59.208 closed.
Cleaning on node 172.27.59.233
2165
flanneld stop/waiting</p>

<p>Connection to 172.27.59.233 closed.</p>

<p>Connection to 172.27.59.233 closed.</p>

<p>Done</p>
