How to delete a kubernetes deployment with kubectl

First select the deployment name in the current context you, if you don’t know it with the following command:

kubectl get deploy

You should get a list of deployments similar to the following:

NAME READY…


This content originally appeared on DEV Community and was authored by Adrian Matei

First select the deployment name in the current context you, if you don't know it with the following command:

kubectl get deploy

You should get a list of deployments similar to the following:

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
pdv-location-batch-test                    0/1     1            0           2m12s
connector-partner-service                  1/1     1            1           330d

Then use kubectl delete deploy <deployment name> to delete the deployment, in my case pdv-location-batch-test was the deployment I was looking for:

kubectl delete deploy pdv-location-batch-test

You should get something similar to the following:

deployment.apps "pdv-lokation-batch-test" deleted

Shared with ❤️ from Codever. Use 👉 copy to mine functionality to add it to your personal snippets collection.


This content originally appeared on DEV Community and was authored by Adrian Matei


Print Share Comment Cite Upload Translate Updates
APA

Adrian Matei | Sciencx (2022-02-04T08:21:26+00:00) How to delete a kubernetes deployment with kubectl. Retrieved from https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/

MLA
" » How to delete a kubernetes deployment with kubectl." Adrian Matei | Sciencx - Friday February 4, 2022, https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/
HARVARD
Adrian Matei | Sciencx Friday February 4, 2022 » How to delete a kubernetes deployment with kubectl., viewed ,<https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/>
VANCOUVER
Adrian Matei | Sciencx - » How to delete a kubernetes deployment with kubectl. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/
CHICAGO
" » How to delete a kubernetes deployment with kubectl." Adrian Matei | Sciencx - Accessed . https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/
IEEE
" » How to delete a kubernetes deployment with kubectl." Adrian Matei | Sciencx [Online]. Available: https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/. [Accessed: ]
rf:citation
» How to delete a kubernetes deployment with kubectl | Adrian Matei | Sciencx | https://www.scien.cx/2022/02/04/how-to-delete-a-kubernetes-deployment-with-kubectl/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.