-
Notifications
You must be signed in to change notification settings - Fork 6
/
master.yml
164 lines (140 loc) · 4.38 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#cloud-config
coreos:
update:
reboot-strategy: off
etcd:
discovery: http://%ETCD_DISCOVERY%:4001/v2/keys/cluster
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
runtime: no
content: |
[Unit]
Description=fleet
[Service]
Environment=FLEET_PUBLIC_IP=$public_ipv4
ExecStart=/usr/bin/fleet
- name: flannel.service
command: start
content: |
[Unit]
Requires=etcd.service
After=etcd.service
[Service]
ExecStartPre=-/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.100.0.0/16"}'
ExecStart=/opt/bin/flanneld -iface=$public_ipv4
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: docker.service
command: restart
content: |
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
Requires=flannel.service
After=flannel.service
[Service]
EnvironmentFile=/run/flannel/subnet.env
ExecStartPre=-/usr/bin/ip link set dev docker0 down
ExecStartPre=-/usr/sbin/brctl delbr docker0
ExecStart=/usr/bin/docker -d -s=btrfs -H fd:// --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU}
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: apiserver.service
command: start
content: |
[Unit]
After=etcd.service
After=docker.service
ConditionFileIsExecutable=/opt/bin/kube-apiserver
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=etcd.service
Requires=docker.service
[Service]
ExecStart=/opt/bin/kube-apiserver \
--address=0.0.0.0 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--portal_net=10.0.0.0/24 \
--logtostderr=true \
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: controller-manager.service
command: restart
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/kube-controller-manager
Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=apiserver.service
Requires=apiserver.service
[Service]
ExecStart=/opt/bin/kube-controller-manager -master=127.0.0.1:8080 -machines=%MINION_IP_ADDRS% -v 4
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: scheduler.service
command: start
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/kube-scheduler
Description=Kubernetes Scheduler
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=apiserver.service
After=apiserver.service
[Service]
ExecStart=/opt/bin/kube-scheduler -master=127.0.0.1:8080
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: kubelet.service
command: start
content: |
[Unit]
After=etcd.service
After=docker.service
ConditionFileIsExecutable=/opt/bin/kubelet
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=etcd.service
Requires=docker.service
[Service]
ExecStart=/opt/bin/kubelet \
-address=0.0.0.0 \
-port=10250 \
-hostname_override=$public_ipv4 \
-etcd_servers=http://127.0.0.1:4001
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
- name: proxy.service
command: start
content: |
[Unit]
After=etcd.service
After=docker.service
ConditionFileIsExecutable=/opt/bin/kube-proxy
Description=Kubernetes Proxy
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=etcd.service
Requires=docker.service
[Service]
ExecStart=/opt/bin/kube-proxy -etcd_servers=http://127.0.0.1:4001
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target