<p>I need to delete a kubernetes deployment resource using REST API. That's possible and it works, but I just found out that while the deployment resource is deleted ok, its associated ReplicaSet is not.</p>

<p>That means its pods are still running.</p>

<p>I don't know how to find name of a ReplicaSet associated to a Deployment.</p>

<p>I can see it when using kubectl: <em>kubectl describe deployment mydeployment</em>, but I can't find a REST method to get that information.</p>

<p>Is there a way?</p>

<p>An easy way to find the calls associated would be to use the associated <code>kubectl</code> command with a higher level of verbosity (<code>--v=6</code> or <code>--v=9</code>). </p>

<pre><code>#~ kubectl delete deployment nginx-deployment --v=6
I1201 12:26:16.511683    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:16.568980    6235 round_trippers.go:318] PUT https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:17.621751    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:17.680228    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets?labelSelector=app%3Dnginx 200 OK in 50 milliseconds
I1201 12:26:17.738684    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 56 milliseconds
I1201 12:26:18.790243    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:18.843446    6235 round_trippers.go:318] PUT https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 50 milliseconds
I1201 12:26:18.894538    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:19.946417    6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:20.001367    6235 round_trippers.go:318] DELETE https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 53 milliseconds
I1201 12:26:20.055669    6235 round_trippers.go:318] DELETE https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 53 milliseconds
</code></pre>
