1

I am just getting started with CoreOS, I've been following the step-by-step tutorial about setting up Kubernetes, but I seem to be missing a very basic concept. As I am using Bare Metal, I use the cloud-config-url parameter pointing to an NGINX webserver giving back some very basic cloud-config file which replaces the ip of the host (as given by dhcp). Something like this:

#cloud-config
coreos:
  etcd2:
    discovery: "https://discovery.etcd.io/2ab74sd3a59583012056187ee8b74e9a"
    advertise-client-urls: "http://$public_ipv4:2379"
    initial-advertise-peer-urls: "http://$public_ipv4:2380"
    listen-client-urls: "http://0.0.0.0:2379,http://0.0.0.0:4001"
    listen-peer-urls: "http://$public_ipv4:2380,http://$public_ipv4:7001"
  units:
    - name: etcd2.service
      command: start
    - name: fleet.service
      command: start
ssh_authorized_keys:
....

This is fine. It works.

But what if I want to run a service that does not include the etcd2configuration? or add a service to a specific subset of servers? How do you guys handle that case?

Are there more parameters or headers passed by the kernel to the cloud-config-url? how could I use that in NGINX?

Thanks for your feedback

AlexR
  • 11
  • 1

1 Answers1

0

I assume you can pass a GET parameter and switch the config based on that. You maybe also be interested in the coreos-baremetal project, which does this with a templating language.

Rob
  • 431
  • 2
  • 2
  • Thanks for the reply, yes.. that is a possibility but that would still be static, woudn't it? you would need to have several different entries in your PXE menu, one for `etcd2` servers, one for k8s worker nodes, etc... the baremetal really does look interesting. What is your current approach? – AlexR Sep 08 '16 at 11:13