forked from rainsome-org1/kubernetes-coreos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode2.yml
143 lines (130 loc) · 4.13 KB
/
node2.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
#cloud-config
hostname: node2
coreos:
etcd:
name: node2
addr: 192.168.12.12:4001
bind-addr: 0.0.0.0
peer-addr: 192.168.12.12:7001
peers: 192.168.12.10:7001,192.168.12.11:7001
peer-heartbeat-interval: 250
peer-election-timeout: 1000
units:
- name: static.network
command: start
content: |
[Match]
Name=ens33
[Network]
Address=192.168.12.12/24
DNS=192.168.12.2
Gateway=192.168.12.2
- name: cbr0.netdev
command: start
content: |
[NetDev]
Kind=bridge
Name=cbr0
- name: cbr0.network
command: start
content: |
[Match]
Name=cbr0
[Network]
Address=10.244.2.1/24
[Route]
Destination=10.0.0.0/8
Gateway=0.0.0.0
- name: cbr0-interface.network
command: start
content: |
[Match]
Name=ens34
[Network]
Bridge=cbr0
- name: nat.service
command: start
content: |
[Unit]
Description=NAT non container traffic
[Service]
ExecStart=/usr/sbin/iptables -t nat -A POSTROUTING -o ens33 -j MASQUERADE ! -d 10.0.0.0/8
RemainAfterExit=yes
Type=oneshot
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: docker.service
command: start
content: |
[Unit]
After=network.target
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
[Service]
ExecStartPre=/bin/mount --make-rprivate /
ExecStart=/usr/bin/docker -d -s=btrfs -H fd:// -b cbr0 --iptables=false
[Install]
WantedBy=multi-user.target
- name: download-kubernetes.service
command: start
content: |
[Unit]
After=network-online.target
Before=kubelet.service
Before=proxy.service
Description=Download Kubernetes Binaries
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=network-online.target
[Service]
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/kubelet
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/proxy
ExecStart=/usr/bin/chmod +x /opt/bin/kubelet
ExecStart=/usr/bin/chmod +x /opt/bin/proxy
RemainAfterExit=yes
Type=oneshot
- name: kubelet.service
command: start
content: |
[Unit]
After=etcd.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/kubelet
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=etcd.service
Wants=download-kubernetes.service
[Service]
ExecStart=/opt/bin/kubelet \
--address=0.0.0.0 \
--port=10250 \
--hostname_override=192.168.12.12 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- name: proxy.service
command: start
content: |
[Unit]
After=etcd.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/proxy
Description=Kubernetes Proxy
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=etcd.service
Wants=download-kubernetes.service
[Service]
ExecStart=/opt/bin/proxy --etcd_servers=http://127.0.0.1:4001 --logtostderr=true
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
update:
group: alpha
reboot-strategy: off
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHo+5nVpxDhnWBPhEuQ7D7ZYELvA5+fPEWfHmMUwBdW069FSfX1LtbVAUKW7NGMfCxTijQMfvmFt7i+o28uqrVGN+xlDdkKTarPYO/Ux6Rukw0D5RZLVDVdRIOV8Si26pkFp4ezs1NFnCFsPTXD8U4cQ1lok//x248oKGsB4ZWuRNf4PCaIdXDveXdQRbaV5SDo9JEt9VkmfSraH5JENguP51RhFJYzWQAB1QbRZrHYUfZbE+pb/XDTdSPidfRCvss9fDrrhviZjv1Gr8C9jbmSGRB8pKwGC/GWV/mj8nYEY1K3/0c/N9NNIPtmvNkQjq7eGsSUf0cM8ZbwWugr8cB kelseyhightower