osops-tools-contrib/terraform/kubernetes-coreos/templates/cloud-init

28 lines
865 B
Plaintext

#cloud-config
coreos:
units:
- name: etcd.service
mask: true
- name: etcd2.service
command: start
- name: flanneld.service
command: start
drop-ins:
- name: 50-network-config.conf
content: |
[Service]
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ "Network": "${flannel_network}", "Backend": { "Type": "${flannel_backend}"} }'
flannel:
interface: $private_ipv4
etcd2:
discovery: ${discovery_url}
advertise-client-urls: http://$private_ipv4:2379
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
data-dir: /var/lib/etcd2
initial-cluster-token: ${cluster_token}
update:
reboot-strategy: "off"