Kubernetes force delete RC not deleting

5/15/2017

I'm not able to delete one of the replication controller no matter what, seems like it is corrupted as it is affecting some components.

 kubectl delete rc kube-dns-v20  --namespace=kube-system
error: timed out waiting for "kube-dns-v20" to be synced

Tried with several options like cascade=false, it says deleted, when actually it is not deleting it.

kubectl delete rc kube-dns-v20  --namespace=kube-system --force=true --cascade=false
replicationcontroller "kube-dns-v20" deleted

Any other way in which this can be done?

-- Vikram
kubernetes

2 Answers

5/19/2020

I had a similar issue. Have you tried deleting the associated "deploymentconfig"? You can find it with kubectl get dc and then delete with kubectl delete dc <name>.

-- namloc2001
Source: StackOverflow

5/15/2017

Attempt setting the grace-period to 0?

kubectl delete rc kube-dns-v20 --force=true --grace-period=0 --namespace=kube-system

-- holger
Source: StackOverflow