简体   繁体   中英

GCP Metadata Larger 256kb

i need to use metadata user-data for few instances (on linux FCOS) larger than 256kb, but i got:

is too large: maximum size 262144 character

https://cloud.google.com/compute/docs/metadata/setting-custom-metadata#limitations

It's possible to:

  • anyhow use larger than 256kb metadata user-data ?
  • or fetch user-data for instance from a remote server eg: I could upload this user-data to any HTTP server?

I found.. solution via remote ignition file.

I tried increasing the 256kb per single metadata limit via google support but they cant increase this for me.

Workaround via remote ignition file:

  1. In Fedora CoreOS user-data add the below snippet
  2. On Nginx share a big ignition file larger than 256kb
  3. Start instance, instance will connect to remote Nginx to get big ignition file
{
  "ignition": {
    "config": {
      "merge": [
        {
          "source": "http://xxxx/file.ign"
        }
      ]
    },
    "version": "3.2.0"
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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