Delete pod, service, RC and namespace


https://kubernetes.io/docs/user-guide/kubectl-cheatsheet/

Delete Pods


Delete Replications Controllers

vagrant@contrib-jessie:~$ kubectl get rc --all-namespaces
NAMESPACE NAME DESIRED CURRENT READY AGE
jlk-namespace jlk-nginx-1 0 0 0 6d
kube-system kube-dns-v19 1 1 1 143d


vagrant@contrib-jessie:~$ kubectl --namespace=jlk-namespace delete rc jlk-nginx-1
replicationcontroller "jlk-nginx-1" deleted


vagrant@contrib-jessie:~$ kubectl describe namespace jlk-namespace
Name: jlk-namespace
Labels: <none>
Status: Active

No resource quota.

No resource limits.


Delete empty namespace

vagrant@contrib-jessie:~$ kubectl delete namespace jlk-namespace
namespace "jlk-namespace" deleted
vagrant@contrib-jessie:~$