2

I recently changed the version of the app when deployment and everytime i execute gcloud compute instances list it will list out the old version, i tried manually deleting from the console and it works but after few minutes it will go back. I tried gcloud delete too gcloud compute instances delete instance --delete-disks all

Stopping doesnt help to, as it is a running instance would it charge me on its up time? How do i completely remove it (Did tried removing appengine version too but it keeps coming back)?

4

1 回答 1

2

I've been having a lot of trouble with deploying (with versions) and deleting instances on Google Compute Engine's managed VMs. Here's a solution I found for deleting the default GCE managed VM:

  • Make sure you have the up-to-date GCE components. Run gcloud components update in the Google Cloud SDK Shell.
  • In your app.yaml, remove the vm:true, resources: section, and manual scaling: section.
  • Navigate to Compute -> App Engine -> Versions and record the <default-version-number>. Mine looks like 20150722t1245032 with the words (default) indicating the default version.
  • Deploy the application, set the default, and specify the default version. gcloud preview app deploy "...\app.yaml" --set-default --version=<default-version-number>.
  • Navigate to Compute -> Compute Engine -> VM instances. Select the default instance and delete.

I was also taught how to stop deploying additional instances:

  • The key is to specify the version number gcloud preview app deploy "...\app.yaml" --set-default --version=<version-number>. @ZacharyNewman was able to help me with this problem.

And finally, this is how to delete the additional versions of an instance:

  • Navigate to Compute -> App Engine -> Versions and delete the versions you don't want.
  • Navigate to Compute -> Compute Engine -> VM instances. Select the instances you don't want and delete.

Hope this helps!

于 2015-08-03T16:29:40.800 回答