How to stop Replicaset from restarting?

2020-04-14 16:19发布

I started a test if my kubernetes installation is running well, with:

$ kubectl run -it hello --image=busybox -- sh

However it didn't work. Now I want to just clean up everything before I figure out how to continue. But if I deletethe pod it gets restarted, I suppose by a corresponding replicaset. But this gets restarted as well if I delete it. What can I do now to clean up whatever kubectl run did?

1条回答
戒情不戒烟
2楼-- · 2020-04-14 16:35

The run command creates a deployment which controls the replicaset please run the following commands to verify and solve:

kubectl get deployments

kubectl delete deployment hello
查看更多
登录 后发表回答