Dean Schulze
Dean Schulze

Reputation: 10303

Using kubectl to tear down from yaml

I created a .yaml file following this tutorial. You deploy the web service with kubectl apply -f shopfront-service.yaml. So far so good. The author says nothing though about how to tear everything down.

With TerraForm or CloudFormation you use the same .yaml file to remove all resources. I would think that K8 would also support cleaning up using the same .yaml file, but I can't find any way to do this.

Is there a way to delete resources with the same .yaml file used to create the deployment?

Upvotes: 0

Views: 789

Answers (1)

stacksonstacks
stacksonstacks

Reputation: 9313

kubectl delete -f shopfront-service.yaml
see kubectl delete docs

Upvotes: 1

Related Questions