5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

k8s Deploymentを全削除する

Last updated at Posted at 2020-06-21

はじめに

kubernetesでdeploymentなどの特定のリソースを全て削除するための方法を記載する。
deployment以外のリソースを全削除したい場合も有効。

kubernetesのDeploymentを全削除する

$ kubectl get deploy --no-headers -o custom-columns="NAME:{metadata.name}" | xargs kubectl delete deploy

kubernetesの指定リソースを全削除する

$ kubectl get[リソース名] --no-headers -o custom-columns="NAME:{metadata.name}" | xargs kubectl delete [リソース名]
5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?