0

My understanding is that the intended way of cloud-init working is that it retrieves metadata and userdata once per instance. Can this be changed so that cloud-init retrieves data on every boot?

I noticed that removing the directory /var/lib/cloud/instances/12345678-1234-5678-1234-567812345678/ forces a new retrieval, but this runs the other initialization of the node too.

I would like to for example change my instances ntp-server ip, and it seems that cloud-init is unable to do that. What am I missing?

1 Answers1

0

Most providers allow to update userdata of an existing instance [1] [2]. This way you can provide new details to cloud-init which will run again on a subsequent restart of the instance. However, cloud-init is stateless, so you will need to repass the whole userdata to the instance for correct contextualization else you risk losing hostname for example, or any information pushed via userdata at first boot.