0

Is there a recommended way of running cloud-init on Google Container-Optimized OS once the instance is up and have it fetch the latest metadata?

So far, I have been blowing away the /var/lib/cloud/instances directory and rerunning, but that seems hacky.

Ross Light
  • 4,769
  • 1
  • 26
  • 37

1 Answers1

2

On Container-Optimized OS images, there is /usr/share/cloud/rerun-cloudinit.sh that you can run. It will re-fetch the latest metadata and run all required cloud-init steps.

Aditya K.
  • 147
  • 5