'How to delete a kubernetes deployment using kubernetes python client?
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.
Solution 1:[1]
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 )
Solutions:
- Maybe you can use the code proposed in the above PR
- Create your own PR
- use
kubectl deletecommand for this...
Bguess
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | bguess |

