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 👉 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

Default value for jax-rs query parameter

Default value for jax-rs query parameter code snippet Continue reading

Unmarshalling xml string to java object with JAXB

Published on February 20, 2022

Execute delete statement with jpa query

Published on February 19, 2022