Reputation: 5147
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.
Upvotes: 0
Views: 705
Reputation: 147
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.
Upvotes: 2