简体   繁体   English

如何从谷歌云平台删除应用版本

[英]How to delete an App Version from Google Cloud Platform

I am newbie and I was playing around couple of months back with Google Cloud and by mistake I somehow have added a Version/hello world project that looks like below and it is doing some logging which is taking 100 GB of space and Google is charging me for that space.我是新手,几个月前我在玩谷歌云,我错误地添加了一个版本/hello world 项目,如下所示,它正在做一些日志记录,这占用了 100 GB 的空间,谷歌向我收费对于那个空间。 I just want to get rid of it but I am not able to do so.我只想摆脱它,但我做不到。 Please help me.请帮我。

Screenshot for reference.截图供参考。

在此处输入图像描述

在此处输入图像描述

EDIT编辑

在此处输入图像描述

Issue: Why am I not able to completely delete it.问题:为什么我不能完全删除它。 I am beginner so please guide me how to get rid of it?我是初学者所以请指导我如何摆脱它? I am getting charged every month.我每个月都要收费。 Where can I click and delete it.在哪里可以点击删除。

PS: I know I have not asked this question properly but I don't have the proper terminology knowledge to ask my query properly. PS:我知道我没有正确地问过这个问题,但我没有适当的术语知识来正确地问我的问题。

Just click on the square in the left side of the version row in the table pictured in your 1st screenshot to select it and the Delete button should activate.只需单击第一个屏幕截图中所示表格中版本行左侧的方块即可选择它,删除按钮应该会激活。

Update:更新:

Hm, ok.嗯,好的。 Looks like the only remaining version can't be deleted.看起来唯一剩下的版本无法删除。 You could also:您还可以:

  • disable your app if this is the only service in it from the Settings Menu.如果这是“ Settings菜单中唯一的服务,请禁用您的应用。
  • delete the app if you no longer need that app ID (you won't be able to re-use that ID for a new app)如果您不再需要该应用程序 ID,请删除该应用程序(您将无法将该 ID 重新用于新应用程序)
  • deploy a new version which doesn't do anything, switch traffic to it and delete the old version.部署一个什么都不做的新版本,将流量切换到它并删除旧版本。 I'd make the new version a standard environment one, which has a free quota, instead of a flexible environment one, eventually with just a static dir handler pointing to an empty dir.我会让新版本成为一个标准环境版本,它有一个免费配额,而不是一个灵活的环境版本,最终只有一个指向空目录的静态目录处理程序。

You can use this with your CI/CD script.您可以将其与您的 CI/CD 脚本一起使用。 This works with Linux.这适用于 Linux。

gcloud app versions delete `gcloud app versions list | sed 's/  */:/g' | cut -f 2 -d : | tail -n +2 | head -n -1` --quiet
gcloud app versions delete [NAME]

For quick and nice way of deleting App Version through CLI:对于通过 CLI 删除 App Version 的快捷方式:

gcloud app services delete {services list} --version=XXXX

Example: gcloud app services delete night-worker default day-worker --version=version2019示例: gcloud app services delete night-worker default day-worker --version=version2019

That way you will save yourself time for deleting App Engine versions.这样您就可以节省删除 App Engine 版本的时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM