GCP Metadata Larger 256kb

74 Views Asked by At

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 e.g.: I could upload this user-data to any HTTP server?
1

There are 1 best solutions below

2
TheAnotherWise On BEST ANSWER

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"
  }
}