I want to add an authorized key so I wrote a yaml for coreos, i logged in as core into my coreos and issue a coreos-cloudinit for the below file

  - name: xyz
       - ssh-rsa asdfadf....

It looks like it deleted my previous default user 'core'

1) does coreos-cloudinit wipes the previous config ?
2) if so how do I append to the existing config ?
3) how do I dump the exising cloud config so I can append to it and do a cloudinit again?



Your cloud-config file is processed during each boot. If the file is updated, the new file will be used on the next boot (and all subsequent boots). Updating the config depends on what platform you are running your machine on:

cloud providers: the providers metadata service is the source of truth and you can update it via whatever means they provide (UI, API, etc). On GCE metadata can be updated at any time. AWS can be updated, but only when the machine is stopped. DigitalOcean can't update metadata at all.

bare metal: if you installed to disk, you can update /var/lib/coreos-install/user_data at any time and it will be processed on the next boot.

pxe bare metal: a new cloud-config specified in the parameter cloud-config-url is fetched on each boot. This can be updated at any time.

  • Thanks. I think we did the third option pxe bare metal so I looked at the /proc/cmdline and went to the cloud-config-url and idid a curl. All I got was : #cloud-config # No kickstart.snippets for this host! Bailing out runcmd: - reboot .
    – resultsway
    Mar 12 '15 at 18:26
  • so, you mean to say that whatever i do with cloudinit will not be persistent ? and that it will take the cloud cfg only from the cmdline ? Thx.
    – resultsway
    Mar 12 '15 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.