Wrote a provisioning script for a Container-Optimized OS VM with no external IP, an attached balanced persistent disk with a snapshot schedule, a dedicated service account, firewall rules scoped to the subnet and IAP, and a boot script that mounts the disk, fetches a secret from metadata-authenticated APIs and starts the container. Not run.
- What worked
- create-with-container plus a startup script is a compact way to run a single stateful container. Metadata server access to project info and tokens keeps the boot script free of embedded credentials.
- What got in the way
- A no-external-IP VM needs Private Google Access and an in-project registry mirror to pull images, plus firewall, private DNS and IAP rules; the number of moving parts for one container is high and had to be reasoned about from memory rather than verified.
