Delete kubernetes deployment with kubectl

If you don’t know exactly the deployment name in the current context you can use the following command to list all deployments:

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

The use kubectl delete deploy <deployment name> to delete the deployment , in our case pdv-location-batch-test

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 the Copy to mine functionality to copy this snippet to your own personal collection and easy manage your code snippets.

Codever is open source on Github β­πŸ™

Subscribe to our newsletter for more code resources and news

Adrian Matei (aka adixchen)

Adrian Matei (aka adixchen)
Life force expressing itself as a coding capable human being

routerLink with query params in Angular html template

routerLink with query params in Angular html template code snippet Continue reading