CoreOS:如何提供不同的云configuration“configuration文件”

我刚刚开始使用CoreOS,我一直按照关于设置Kubernetes的一步一步的教程,但我似乎缺less一个非常基本的概念。 在我使用Bare Metal的时候,我使用指向NGINX webserver的cloud-config-url参数给出一些非常基本的云configuration文件,它替代了主机的ip(由dhcp给出)。 像这样的东西:

 #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: .... 

这可以。 有用。

但是如果我想运行一个包含etcd2configuration的服务呢? 或者将服务添加到服务器的特定子集? 你们如何处理这种情况?

是否有更多的参数或内核传递给cloud-config-url ? 我怎么能在NGINX中使用它?

感谢您的反馈意见

我假设你可以传递一个GET参数,并根据它切换configuration。 您可能也对coreos-baremetal项目感兴趣,它使用模板语言来完成此任务。