examples/k8s: Run etcd on controller, proxies on workers

* Update the etcd topology in the k8s and k8s-install static
manifest clusters to mirror the self-hosted Kubernetes setup
This commit is contained in:
Dalton Hubble
2016-07-08 22:34:59 -07:00
parent 446d44a220
commit 134ea88d72
10 changed files with 18 additions and 28 deletions

View File

@@ -6,12 +6,12 @@
"mac": "52:54:00:a1:9c:ae"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
"etcd_initial_cluster": "node1=http://172.17.0.21:2380",
"etcd_name": "node1",
"ipv4_address": "172.17.0.21",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
"k8s_etcd_endpoints": "http://172.17.0.21:2379",
"k8s_pod_network": "10.2.0.0/16",
"k8s_service_ip_range": "10.3.0.0/24",
"networkd_address": "172.17.0.21/16",

View File

@@ -6,13 +6,12 @@
"mac": "52:54:00:b2:2f:86"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
"etcd_name": "node2",
"etcd_initial_cluster": "node1=http://172.17.0.21:2380",
"ipv4_address": "172.17.0.22",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.17.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
"k8s_etcd_endpoints": "http://172.17.0.21:2379",
"networkd_address": "172.17.0.22/16",
"networkd_dns": "172.17.0.3",
"networkd_gateway": "172.17.0.1",

View File

@@ -6,13 +6,12 @@
"mac": "52:54:00:c3:61:77"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
"etcd_name": "node3",
"etcd_initial_cluster": "node1=http://172.17.0.21:2380",
"ipv4_address": "172.17.0.23",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.17.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
"k8s_etcd_endpoints": "http://172.17.0.21:2379",
"networkd_address": "172.17.0.23/16",
"networkd_dns": "172.17.0.3",
"networkd_gateway": "172.17.0.1",

View File

@@ -7,12 +7,12 @@
"mac": "52:54:00:a1:9c:ae"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"etcd_name": "node1",
"ipv4_address": "172.15.0.21",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
"k8s_etcd_endpoints": "http://172.15.0.21:2379",
"k8s_pod_network": "10.2.0.0/16",
"k8s_service_ip_range": "10.3.0.0/24",
"networkd_address": "172.15.0.21/16",

View File

@@ -7,13 +7,12 @@
"mac": "52:54:00:b2:2f:86"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_name": "node2",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"ipv4_address": "172.15.0.22",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.15.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
"k8s_etcd_endpoints": "http://172.15.0.21:2379",
"networkd_address": "172.15.0.22/16",
"networkd_dns": "172.15.0.3",
"networkd_gateway": "172.15.0.1"

View File

@@ -7,13 +7,12 @@
"mac": "52:54:00:c3:61:77"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_name": "node3",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"ipv4_address": "172.15.0.23",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.15.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
"k8s_etcd_endpoints": "http://172.15.0.21:2379",
"networkd_address": "172.15.0.23/16",
"networkd_dns": "172.15.0.3",
"networkd_gateway": "172.15.0.1"

View File

@@ -6,7 +6,7 @@
"mac": "52:54:00:a1:9c:ae"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"etcd_name": "node1",
"ipv4_address": "172.15.0.21",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",

View File

@@ -6,13 +6,12 @@
"mac": "52:54:00:b2:2f:86"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_name": "node2",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"ipv4_address": "172.15.0.22",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.15.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
"k8s_etcd_endpoints": "http://172.15.0.21:2379",
"networkd_address": "172.15.0.22/16",
"networkd_dns": "172.15.0.3",
"networkd_gateway": "172.15.0.1",

View File

@@ -6,13 +6,12 @@
"mac": "52:54:00:c3:61:77"
},
"metadata": {
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
"etcd_name": "node3",
"etcd_initial_cluster": "node1=http://172.15.0.21:2380",
"ipv4_address": "172.15.0.23",
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
"k8s_controller_endpoint": "https://172.15.0.21",
"k8s_dns_service_ip": "10.3.0.10",
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
"k8s_etcd_endpoints": "http://172.15.0.21:2379",
"networkd_address": "172.15.0.23/16",
"networkd_dns": "172.15.0.3",
"networkd_gateway": "172.15.0.1",

View File

@@ -7,13 +7,9 @@ systemd:
- name: 40-etcd-cluster.conf
contents: |
[Service]
Environment="ETCD_NAME={{.etcd_name}}"
Environment="ETCD_ADVERTISE_CLIENT_URLS=http://{{.ipv4_address}}:2379"
Environment="ETCD_INITIAL_ADVERTISE_PEER_URLS=http://{{.ipv4_address}}:2380"
Environment="ETCD_PROXY=on"
Environment="ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
Environment="ETCD_LISTEN_PEER_URLS=http://{{.ipv4_address}}:2380"
Environment="ETCD_INITIAL_CLUSTER={{.etcd_initial_cluster}}"
Environment="ETCD_STRICT_RECONFIG_CHECK=true"
- name: flanneld.service
dropins:
- name: 40-ExecStartPre-symlink.conf