Last active
July 13, 2019 20:54
-
-
Save ryancurrah/ab320ea6ce65587e2706 to your computer and use it in GitHub Desktop.
CoreOS w/ Kubernetes Cloud Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
#type: master | |
--- | |
hostname: master01 | |
users: | |
- name: core | |
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe. | |
groups: | |
- sudo | |
- docker | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj/Pw3uDI3KXnLsBl1gHoHeGMKIdsmtM6amWNIQaQTehdj9d94BvRGinR1GSazDWsRtPYlLU4Jrodztn53WO70XU+2p34atA6tVtzeBsvqzjFKKzSgc6KyVXo75ZTpTVZJDS+zYimw5Tbro4KeDM2DSOx/My5ASRCGUFBdxvVQ2zGTZHmToSBhzms0PqiQb0TdhlOIiNG7ors45DbRi5ehYBKxfRvUVpc5/DdhURx9K2hlmwyT8BL+/+yez9smdPxQADK7P/wOwEG9Sj0Ew23uaNVji2XaCwcr7tUloCiq6Bjnl1JIqzUZ7rkydAJRL1dFvtBPRlV7wWS1eDC/jKmJ | |
write-files: | |
- path: /etc/conf.d/nfs | |
permissions: '0644' | |
content: | | |
OPTS_RPC_MOUNTD="" | |
- path: /opt/bin/wupiao | |
permissions: '0755' | |
content: | | |
#!/bin/bash | |
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen | |
[ -n "$1" ] && \ | |
until curl -o /dev/null -sIf http://${1}; do \ | |
sleep 1 && echo .; | |
done; | |
exit $? | |
coreos: | |
etcd2: | |
name: master | |
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
advertise-client-urls: http://192.168.122.10:2379,http://192.168.122.10:4001 | |
initial-cluster-token: k8s_etcd | |
listen-peer-urls: http://192.168.122.10:2380,http://192.168.122.10:7001 | |
initial-advertise-peer-urls: http://192.168.122.10:2380 | |
initial-cluster: master=http://192.168.122.10:2380 | |
initial-cluster-state: new | |
fleet: | |
metadata: "role=master" | |
units: | |
- name: static.network | |
content: | | |
[Match] | |
Name=enp0s8 | |
[Network] | |
Address=192.168.122.10/24 | |
[Route] | |
Gateway=192.168.122.1 | |
Scope=link | |
- name: generate-serviceaccount-key.service | |
command: start | |
content: | | |
[Unit] | |
Description=Generate service-account key file | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStart=/bin/openssl genrsa -out /opt/bin/kube-serviceaccount.key 2048 2>/dev/null | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: setup-network-environment.service | |
command: start | |
content: | | |
[Unit] | |
Description=Setup Network Environment | |
Documentation=https://github.com/kelseyhightower/setup-network-environment | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment | |
ExecStart=/opt/bin/setup-network-environment | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: fleet.service | |
command: start | |
- name: flanneld.service | |
command: start | |
drop-ins: | |
- name: 50-network-config.conf | |
content: | | |
[Unit] | |
Requires=etcd2.service | |
[Service] | |
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' | |
- name: docker.service | |
command: start | |
- name: kube-apiserver.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes API Server | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service etcd2.service generate-serviceaccount-key.service | |
After=setup-network-environment.service etcd2.service generate-serviceaccount-key.service | |
[Service] | |
EnvironmentFile=/etc/network-environment | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-apiserver -z /opt/bin/kube-apiserver https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-apiserver | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-apiserver | |
ExecStartPre=/opt/bin/wupiao 127.0.0.1:2379/v2/machines | |
ExecStart=/opt/bin/kube-apiserver \ | |
--service_account_key_file=/opt/bin/kube-serviceaccount.key \ | |
--service_account_lookup=false \ | |
--admission_control=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \ | |
--runtime_config=api/v1 \ | |
--allow_privileged=true \ | |
--insecure_bind_address=0.0.0.0 \ | |
--insecure_port=8080 \ | |
--kubelet_https=true \ | |
--secure_port=6443 \ | |
--service-cluster-ip-range=10.100.0.0/16 \ | |
--etcd_servers=http://127.0.0.1:2379 \ | |
--public_address_override=${DEFAULT_IPV4} \ | |
--logtostderr=true | |
Restart=always | |
RestartSec=10 | |
- name: kube-controller-manager.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Controller Manager | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=kube-apiserver.service | |
After=kube-apiserver.service | |
[Service] | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-controller-manager -z /opt/bin/kube-controller-manager https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-controller-manager | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-controller-manager | |
ExecStart=/opt/bin/kube-controller-manager \ | |
--service_account_private_key_file=/opt/bin/kube-serviceaccount.key \ | |
--master=127.0.0.1:8080 \ | |
--logtostderr=true | |
Restart=always | |
RestartSec=10 | |
- name: kube-scheduler.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Scheduler | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=kube-apiserver.service | |
After=kube-apiserver.service | |
[Service] | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-scheduler -z /opt/bin/kube-scheduler https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-scheduler | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-scheduler | |
ExecStart=/opt/bin/kube-scheduler --master=127.0.0.1:8080 | |
Restart=always | |
RestartSec=10 | |
- name: kubectl.service | |
command: start | |
content: | | |
[Unit] | |
Description=kubectl controls the Kubernetes cluster manager | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStart=/usr/bin/curl -L -o /opt/bin/kubectl -z /opt/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubectl | |
ExecStartPost=/usr/bin/chmod +x /opt/bin/kubectl | |
RemainAfterExit=yes | |
Type=oneshot | |
update: | |
group: stable | |
reboot-strategy: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
#type: node | |
--- | |
hostname: node01 | |
users: | |
- name: core | |
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe. | |
groups: | |
- sudo | |
- docker | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj/Pw3uDI3KXnLsBl1gHoHeGMKIdsmtM6amWNIQaQTehdj9d94BvRGinR1GSazDWsRtPYlLU4Jrodztn53WO70XU+2p34atA6tVtzeBsvqzjFKKzSgc6KyVXo75ZTpTVZJDS+zYimw5Tbro4KeDM2DSOx/My5ASRCGUFBdxvVQ2zGTZHmToSBhzms0PqiQb0TdhlOIiNG7ors45DbRi5ehYBKxfRvUVpc5/DdhURx9K2hlmwyT8BL+/+yez9smdPxQADK7P/wOwEG9Sj0Ew23uaNVji2XaCwcr7tUloCiq6Bjnl1JIqzUZ7rkydAJRL1dFvtBPRlV7wWS1eDC/jKmJ | |
write-files: | |
- path: /opt/bin/wupiao | |
permissions: '0755' | |
content: | | |
#!/bin/bash | |
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen | |
[ -n "$1" ] && [ -n "$2" ] && while ! curl --output /dev/null \ | |
--silent --head --fail \ | |
http://${1}:${2}; do sleep 1 && echo -n .; done; | |
exit $? | |
coreos: | |
etcd2: | |
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
advertise-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
initial-cluster: master=http://192.168.122.10:2380 | |
proxy: on | |
fleet: | |
metadata: "role=node" | |
units: | |
- name: static.network | |
content: | | |
[Match] | |
Name=enp0s8 | |
[Network] | |
Address=192.168.122.11/24 | |
[Route] | |
Gateway=192.168.122.1 | |
Scope=link | |
- name: fleet.service | |
command: start | |
- name: flanneld.service | |
command: start | |
drop-ins: | |
- name: 50-network-config.conf | |
content: | | |
[Unit] | |
Requires=etcd2.service | |
[Service] | |
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' | |
- name: docker.service | |
command: start | |
- name: setup-network-environment.service | |
command: start | |
content: | | |
[Unit] | |
Description=Setup Network Environment | |
Documentation=https://github.com/kelseyhightower/setup-network-environment | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment | |
ExecStart=/opt/bin/setup-network-environment | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: kube-proxy.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Proxy | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-proxy -z /opt/bin/kube-proxy https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-proxy | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kube-proxy \ | |
--master=192.168.122.10:8080 \ | |
--logtostderr=true | |
Restart=always | |
RestartSec=10 | |
- name: kube-kubelet.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Kubelet | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
EnvironmentFile=/etc/network-environment | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet -z /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubelet | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kubelet \ | |
--address=0.0.0.0 \ | |
--port=10250 \ | |
--hostname-override=${DEFAULT_IPV4} \ | |
--api-servers=192.168.122.10:8080 \ | |
--allow-privileged=true \ | |
--logtostderr=true \ | |
--cadvisor-port=4194 \ | |
--healthz-bind-address=0.0.0.0 \ | |
--healthz-port=10248 | |
Restart=always | |
RestartSec=10 | |
- name: kubectl.service | |
command: start | |
content: | | |
[Unit] | |
Description=kubectl controls the Kubernetes cluster manager | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStart=/usr/bin/curl -L -o /opt/bin/kubectl -z /opt/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubectl | |
ExecStartPost=/usr/bin/chmod +x /opt/bin/kubectl | |
RemainAfterExit=yes | |
Type=oneshot | |
update: | |
group: stable | |
reboot-strategy: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
#type: node | |
--- | |
hostname: node02 | |
users: | |
- name: core | |
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe. | |
groups: | |
- sudo | |
- docker | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj/Pw3uDI3KXnLsBl1gHoHeGMKIdsmtM6amWNIQaQTehdj9d94BvRGinR1GSazDWsRtPYlLU4Jrodztn53WO70XU+2p34atA6tVtzeBsvqzjFKKzSgc6KyVXo75ZTpTVZJDS+zYimw5Tbro4KeDM2DSOx/My5ASRCGUFBdxvVQ2zGTZHmToSBhzms0PqiQb0TdhlOIiNG7ors45DbRi5ehYBKxfRvUVpc5/DdhURx9K2hlmwyT8BL+/+yez9smdPxQADK7P/wOwEG9Sj0Ew23uaNVji2XaCwcr7tUloCiq6Bjnl1JIqzUZ7rkydAJRL1dFvtBPRlV7wWS1eDC/jKmJ | |
write-files: | |
- path: /opt/bin/wupiao | |
permissions: '0755' | |
content: | | |
#!/bin/bash | |
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen | |
[ -n "$1" ] && [ -n "$2" ] && while ! curl --output /dev/null \ | |
--silent --head --fail \ | |
http://${1}:${2}; do sleep 1 && echo -n .; done; | |
exit $? | |
coreos: | |
etcd2: | |
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
advertise-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
initial-cluster: master=http://192.168.122.10:2380 | |
proxy: on | |
fleet: | |
metadata: "role=node" | |
units: | |
- name: static.network | |
content: | | |
[Match] | |
Name=enp0s8 | |
[Network] | |
Address=192.168.122.12/24 | |
[Route] | |
Gateway=192.168.122.1 | |
Scope=link | |
- name: fleet.service | |
command: start | |
- name: flanneld.service | |
command: start | |
drop-ins: | |
- name: 50-network-config.conf | |
content: | | |
[Unit] | |
Requires=etcd2.service | |
[Service] | |
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' | |
- name: docker.service | |
command: start | |
- name: setup-network-environment.service | |
command: start | |
content: | | |
[Unit] | |
Description=Setup Network Environment | |
Documentation=https://github.com/kelseyhightower/setup-network-environment | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment | |
ExecStart=/opt/bin/setup-network-environment | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: kube-proxy.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Proxy | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-proxy -z /opt/bin/kube-proxy https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-proxy | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kube-proxy \ | |
--master=192.168.122.10:8080 \ | |
--logtostderr=true | |
Restart=always | |
RestartSec=10 | |
- name: kube-kubelet.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Kubelet | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
EnvironmentFile=/etc/network-environment | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet -z /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubelet | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kubelet \ | |
--address=0.0.0.0 \ | |
--port=10250 \ | |
--hostname-override=${DEFAULT_IPV4} \ | |
--api-servers=192.168.122.10:8080 \ | |
--allow-privileged=true \ | |
--logtostderr=true \ | |
--cadvisor-port=4194 \ | |
--healthz-bind-address=0.0.0.0 \ | |
--healthz-port=10248 | |
Restart=always | |
RestartSec=10 | |
- name: kubectl.service | |
command: start | |
content: | | |
[Unit] | |
Description=kubectl controls the Kubernetes cluster manager | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStart=/usr/bin/curl -L -o /opt/bin/kubectl -z /opt/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubectl | |
ExecStartPost=/usr/bin/chmod +x /opt/bin/kubectl | |
RemainAfterExit=yes | |
Type=oneshot | |
update: | |
group: stable | |
reboot-strategy: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
#type: node | |
--- | |
hostname: node03 | |
users: | |
- name: core | |
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe. | |
groups: | |
- sudo | |
- docker | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj/Pw3uDI3KXnLsBl1gHoHeGMKIdsmtM6amWNIQaQTehdj9d94BvRGinR1GSazDWsRtPYlLU4Jrodztn53WO70XU+2p34atA6tVtzeBsvqzjFKKzSgc6KyVXo75ZTpTVZJDS+zYimw5Tbro4KeDM2DSOx/My5ASRCGUFBdxvVQ2zGTZHmToSBhzms0PqiQb0TdhlOIiNG7ors45DbRi5ehYBKxfRvUVpc5/DdhURx9K2hlmwyT8BL+/+yez9smdPxQADK7P/wOwEG9Sj0Ew23uaNVji2XaCwcr7tUloCiq6Bjnl1JIqzUZ7rkydAJRL1dFvtBPRlV7wWS1eDC/jKmJ | |
write-files: | |
- path: /opt/bin/wupiao | |
permissions: '0755' | |
content: | | |
#!/bin/bash | |
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen | |
[ -n "$1" ] && [ -n "$2" ] && while ! curl --output /dev/null \ | |
--silent --head --fail \ | |
http://${1}:${2}; do sleep 1 && echo -n .; done; | |
exit $? | |
coreos: | |
etcd2: | |
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
advertise-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 | |
initial-cluster: master=http://192.168.122.10:2380 | |
proxy: on | |
fleet: | |
metadata: "role=node" | |
units: | |
- name: static.network | |
content: | | |
[Match] | |
Name=enp0s8 | |
[Network] | |
Address=192.168.122.13/24 | |
[Route] | |
Gateway=192.168.122.1 | |
Scope=link | |
- name: fleet.service | |
command: start | |
- name: flanneld.service | |
command: start | |
drop-ins: | |
- name: 50-network-config.conf | |
content: | | |
[Unit] | |
Requires=etcd2.service | |
[Service] | |
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' | |
- name: docker.service | |
command: start | |
- name: setup-network-environment.service | |
command: start | |
content: | | |
[Unit] | |
Description=Setup Network Environment | |
Documentation=https://github.com/kelseyhightower/setup-network-environment | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment | |
ExecStart=/opt/bin/setup-network-environment | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: kube-proxy.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Proxy | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-proxy -z /opt/bin/kube-proxy https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kube-proxy | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kube-proxy \ | |
--master=192.168.122.10:8080 \ | |
--logtostderr=true | |
Restart=always | |
RestartSec=10 | |
- name: kube-kubelet.service | |
command: start | |
content: | | |
[Unit] | |
Description=Kubernetes Kubelet | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
[Service] | |
EnvironmentFile=/etc/network-environment | |
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet -z /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubelet | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet | |
# wait for kubernetes master to be up and ready | |
ExecStartPre=/opt/bin/wupiao 192.168.122.10 8080 | |
ExecStart=/opt/bin/kubelet \ | |
--address=0.0.0.0 \ | |
--port=10250 \ | |
--hostname-override=${DEFAULT_IPV4} \ | |
--api-servers=192.168.122.10:8080 \ | |
--allow-privileged=true \ | |
--logtostderr=true \ | |
--cadvisor-port=4194 \ | |
--healthz-bind-address=0.0.0.0 \ | |
--healthz-port=10248 | |
Restart=always | |
RestartSec=10 | |
- name: kubectl.service | |
command: start | |
content: | | |
[Unit] | |
Description=kubectl controls the Kubernetes cluster manager | |
Documentation=https://github.com/GoogleCloudPlatform/kubernetes | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStart=/usr/bin/curl -L -o /opt/bin/kubectl -z /opt/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.0.3/bin/linux/amd64/kubectl | |
ExecStartPost=/usr/bin/chmod +x /opt/bin/kubectl | |
RemainAfterExit=yes | |
Type=oneshot | |
update: | |
group: stable | |
reboot-strategy: off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ryancurrah does this work with latest version of coreos, 1800.7 (stable) and latest kubernetes v.1.11+ or v1.10+?