Delete an application in Cloud Foundry

In the previous tutorial, I showed you how to deploy an application to the Cloud Foundry using a push command. In case you do not want to use that application anymore, delete them because everything you deploy to Cloud Foundry will be charged regardless of whether you use it or not. In this tutorial, I will guide you how to delete an application in the Cloud Foundry!

For example, in my Space on Pivotal Cloud Foundry is deploying an application like this:

Delete an application in Cloud Foundry

Now, to delete this huongdanjava-spring-boot-example application, I will use the delete command of Cloud Foundry, with the following syntax:

To use this delete command, you must first login to Cloud Foundry:

Delete an application in Cloud Foundry

And execute the delete statement:

Delete an application in Cloud Foundry

This delete command will stop the application, cancel the containers that contain the application, and remove the application from the Cloud Foundry.

But you note that this command will not remove the URL that Cloud Foundry created when we deployed the application using the push command. This is useful if we just want to delete the app and keep the URL. If you want to delete the URL, you can execute the delete command with the option “-r” as follows:

Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Add Comment