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

Subscribe to our newsletter for more code resources and news

Adrian Matei

Adrian Matei
Life force expressing itself as a coding capable human being

How to get current time in java enterprise and be easily testable

How to get current time in java enterprise and be easily testable code snippet Continue reading