0

I cannot find the python function to delete a kubernetes deployment. I can delete the pods but that would only cause the deployment to restart the pods again. Basically I want the equivalent of kubectl delete deployment deployment1 --namespace nms.

  • HI Sanjeeb, I am looking for the function to delete pods, you mentioned you got that right could you help me giving me the function name please etc. thanks – jeremy Mar 22 '23 at 11:30

1 Answers1

0

Looks like it doesn't exists a delete_from_yaml.py lib. After following several GitHub history the last update is 12d ago, apparently because it lacks contributors. ( https://github.com/kubernetes-client/python/pull/1392 )

enter image description here

Solutions:

  • Maybe you can use the code proposed in the above PR
  • Create your own PR
  • use kubectl delete command for this...

Bguess

Bguess
  • 1,700
  • 1
  • 11
  • 24