Pulumi & Kubernetes: Destroy stack
Now that we’ve seen how to deploy changes to our program, let’s clean up and tear down the resources that are part of our stack.
To destroy resources, run the following:
$ pulumi destroy
You’ll be prompted to make sure you really want to delete these resources.
Previewing destroy (dev):
Type Name Plan
- pulumi:pulumi:Stack quickstart-dev delete
- ├─ kubernetes:core:Service nginx delete
- └─ kubernetes:apps:Deployment nginx delete
Outputs:
- ip: "10.105.234.140"
Resources:
- 3 to delete
Do you want to perform this destroy? yes
Destroying (dev):
Type Name Status
- pulumi:pulumi:Stack quickstart-dev deleted
- ├─ kubernetes:core:Service nginx deleted
- └─ kubernetes:apps:Deployment nginx deleted
Outputs:
- ip: "10.105.234.140"
Resources:
- 3 deleted
Duration: 1s
To delete the stack itself, run pulumi stack rm
. Note that this removes the stack
entirely from the Pulumi Cloud, along with all of its update history.
Next, we’ll look at some next steps.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.