2
votes

I use node managed vm on google app engine. After I delete google compute instance at console.cloud.google.com , I see instance created automatically in "Operations". (This happens before, I used to delete instances at appengine.google.com which moved to "console" now.) How this happened? And How can I delete it?

3
do you have any deployed version? in App Engine Versions pageIgor Artamonov
I have only one deployed version in App engine version page. And one instance running at compute engine / vm instances. I delete instance from there. But after deletetion, instances were recreated.Michael
you should delete deployed version itself, or instance will be recreatedIgor Artamonov
I can not delete the version itself, because it is the only version.Michael

3 Answers

1
votes

You have to delete deployed version for Flexible VM. Since it's only one version, you have to deploy another one, for standard vm.

Most simple solution would be to deploy an empty version, w/o any code, just one static file. To do that create following app.yaml:

module: default
runtime: python27
api_version: '1.0'
threadsafe: true
handlers:
  - url: /
    static_files: index.html
    upload: index.html
resources:
  cpu: 0.1
  memory_gb: 0.5
  disk_size_gb: 10

put an empty index.html in same dir. And deploy it using:

gcloud preview app deploy app.yaml

After this, you'll be able to route all traffic to this dummy version, and then delete previous version deployed for Flexible VM.

9
votes

When the instance can not be deleted it is because, either when creating an instance the protection against the deletion was checked or because after creating an instance we activated the protection from Gcloud with the following command:

$ gcloud compute instances update < INSTANCE_PATH> --deletion-protection

Sample of Instance path: projects/your-project-265315/zones/us-central1-a/instances/your-instance-v3

Solution:

Active Google Cloud Shell:

Precondition:

Request permission for the user to access the machine (regardless of the SSH connection to the instance) to avoid 403: Insufficient Permission.

$ gcloud auth login

If the deletion of the instance is protected, eliminate the protection.

$ gcloud compute instances update <INSTANCE_PATH> --no-deletion-protection

Then we delete the instance by selecting the zone correctly.

$ gcloud compute instances delete <instance-path>

GL

0
votes

You need to delete the module from your app description. Otherwise App Engine will keep spinning new instances in accordance with the scale settings in your module description.