Roxy Light
Roxy Light

Reputation: 5147

How do I rerun cloud-init without shutting down?

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

Answers (1)

Aditya K.
Aditya K.

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

Related Questions