Kubernetes pod gets recreated when deleted

后端 未结 17 1045
清酒与你
清酒与你 2020-12-12 10:25

I have started pods with command

$ kubectl run busybox --image=busybox --restart=Never --tty -i --generator=run-pod/v1

Something went wrong

17条回答
  •  执念已碎
    2020-12-12 10:47

    Instead of trying to figure out whether it is a deployment, deamonset, statefulset... or what (in my case it was a replication controller that kept spanning new pods :) In order to determine what it was that kept spanning up the image I got all the resources with this command:

    kubectl get all

    Of course you could also get all resources from all namespaces:

    kubectl get all --all-namespaces

    or define the namespace you would like to inspect:

    kubectl get all -n NAMESPACE_NAME

    Once I saw that the replication controller was responsible for my trouble I deleted it:

    kubectl delete replicationcontroller/CONTROLLER_NAME

提交回复
热议问题