add coreos setup guides

pull/6/head
Kelsey Hightower 2014-10-03 15:22:57 -07:00
parent 90d96e3483
commit bbcce51327
14 changed files with 883 additions and 4 deletions

View File

@ -2,10 +2,9 @@
There are multiple guides on running Kubernetes with [CoreOS](http://coreos.com):
[Single Kubernetes example in any environment](https://github.com/kelseyhightower/kubernetes-coreos)
[CoreOS + Fleet (work in progress)](https://github.com/kelseyhightower/kubernetes-fleet-tutorial)
* [Single Node Kubernetes example in any environment](coreos/coreos_quick_start.md)
* [Multi-node cluster using cloud-config](coreos/coreos_cloud_config.md)
* [Elastic Kubernetes cluster with fleet and flannel](https://github.com/kelseyhightower/kubernetes-fleet-tutorial)
Warning: the following instructions are slightly stale, after setting this up, you need to also start the scheduler binary.

View File

@ -0,0 +1,217 @@
#cloud-config
hostname: master
coreos:
etcd:
name: master
addr: 192.168.12.10:4001
bind-addr: 0.0.0.0
peer-addr: 192.168.12.10:7001
peer-heartbeat-interval: 250
peer-election-timeout: 1000
units:
- name: static.network
command: start
content: |
[Match]
Name=ens33
[Network]
Address=192.168.12.10/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.0.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=apiserver.service
Before=controller-manager.service
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/apiserver
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/controller-manager
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/kubecfg
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/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/scheduler
ExecStart=/usr/bin/chmod +x /opt/bin/apiserver
ExecStart=/usr/bin/chmod +x /opt/bin/controller-manager
ExecStart=/usr/bin/chmod +x /opt/bin/kubecfg
ExecStart=/usr/bin/chmod +x /opt/bin/kubelet
ExecStart=/usr/bin/chmod +x /opt/bin/proxy
ExecStart=/usr/bin/chmod +x /opt/bin/scheduler
RemainAfterExit=yes
Type=oneshot
- name: apiserver.service
command: start
content: |
[Unit]
After=etcd.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/apiserver
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=etcd.service
Wants=download-kubernetes.service
[Service]
ExecStart=/opt/bin/apiserver \
--address=127.0.0.1 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--machines=192.168.12.10,192.168.12.11,192.168.12.12 \
--logtostderr=true
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- name: scheduler.service
command: start
content: |
[Unit]
After=apiserver.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/scheduler
Description=Kubernetes Scheduler
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=apiserver.service
[Service]
ExecStart=/opt/bin/scheduler \
--logtostderr=true \
--master=127.0.0.1:8080
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- name: controller-manager.service
command: start
content: |
[Unit]
After=etcd.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/controller-manager
Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=etcd.service
Wants=download-kubernetes.service
[Service]
ExecStart=/opt/bin/controller-manager \
--master=127.0.0.1:8080 \
--logtostderr=true
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- 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.10 \
--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_public_key>

View File

@ -0,0 +1,143 @@
#cloud-config
hostname: node1
coreos:
etcd:
name: node1
addr: 192.168.12.11:4001
bind-addr: 0.0.0.0
peer-addr: 192.168.12.11:7001
peers: 192.168.12.10:7001,192.168.12.12:7001
peer-heartbeat-interval: 250
peer-election-timeout: 1000
units:
- name: static.network
command: start
content: |
[Match]
Name=ens33
[Network]
Address=192.168.12.11/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.1.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.11 \
--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_public_key>

View File

@ -0,0 +1,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_public_key>

View File

@ -0,0 +1,134 @@
#cloud-config
hostname: standalone
coreos:
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: download-kubernetes.service
command: start
content: |
[Unit]
After=network-online.target
Before=apiserver.service
Before=controller-manager.service
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/apiserver
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/controller-manager
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/kubecfg
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/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/scheduler
ExecStart=/usr/bin/chmod +x /opt/bin/apiserver
ExecStart=/usr/bin/chmod +x /opt/bin/controller-manager
ExecStart=/usr/bin/chmod +x /opt/bin/kubecfg
ExecStart=/usr/bin/chmod +x /opt/bin/kubelet
ExecStart=/usr/bin/chmod +x /opt/bin/proxy
ExecStart=/usr/bin/chmod +x /opt/bin/scheduler
RemainAfterExit=yes
Type=oneshot
- name: apiserver.service
command: start
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/apiserver
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/apiserver \
--address=127.0.0.1 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--machines=127.0.0.1 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
- name: scheduler.service
command: start
content: |
[Unit]
After=apiserver.service
After=download-kubernetes.service
ConditionFileIsExecutable=/opt/bin/scheduler
Description=Kubernetes Scheduler
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=apiserver.service
[Service]
ExecStart=/opt/bin/scheduler \
--logtostderr=true \
--master=127.0.0.1:8080
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- name: controller-manager.service
command: start
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/controller-manager
Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/controller-manager \
--master=127.0.0.1:8080 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
- name: kubelet.service
command: start
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/kubelet
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/kubelet \
--address=127.0.0.1 \
--port=10250 \
--hostname_override=127.0.0.1 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
- name: proxy.service
command: start
content: |
[Unit]
ConditionFileIsExecutable=/opt/bin/proxy
Description=Kubernetes Proxy
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/proxy --etcd_servers=http://127.0.0.1:4001 --logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
update:
group: alpha
reboot-strategy: etcd-lock
ssh_authorized_keys:
- <ssh_public_key>

View File

@ -0,0 +1,75 @@
# CoreOS Cloud Configs
The recommended way to run Kubernetes on CoreOS is to use [Cloud-Config](https://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/).
## Setup
### Standalone
The standalone cloud-config file can be used to setup a single node Kubernetes cluster.
* [standalone.yml](configs/standalone.yml)
### Cluster
The following cloud-config files can be used to setup a three node Kubernetes cluster.
* [master.yml](configs/master.yml)
* [node1.yml](configs/node1.yml)
* [node2.yml](configs/node2.yml)
### Creating config-drives
```
mkdir -p /tmp/new-drive/openstack/latest/
mkdir -p ~/iso
```
```
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
cd kubernetes/docs/getting-started-guides/coreos/configs
```
Using Linux:
```
for i in standalone master node1 node2; do
cp ${i}.yml /tmp/new-drive/openstack/latest/user_data
mkisofs -R -V config-2 -o ~/iso/${i}.iso /tmp/new-drive
done
```
Using OS X:
```
for i in standalone master node1 node2; do
cp ${i}.yml /tmp/new-drive/openstack/latest/user_data
hdiutil makehybrid -iso -joliet -joliet-volume-name "config-2" -joliet -o ~/iso/${i}.iso /tmp/new-drive
done
```
## Remote Access
Setup a SSH tunnel to the Kubernetes API Server.
```
sudo ssh -f -nNT -L 8080:127.0.0.1:8080 core@${APISERVER}
```
Download a kubecfg client
**Darwin**
```
wget http://storage.googleapis.com/kubernetes/darwin/kubecfg -O /usr/local/bin/kubecfg
```
**Linux**
```
wget http://storage.googleapis.com/kubernetes/kubecfg -O /usr/local/bin/kubecfg
```
Issue commands remotely using the kubecfg command line tool.
```
kubecfg list /pods
```

View File

@ -0,0 +1,57 @@
# CoreOS Quick Start Guide
The following steps will setup a single node Kubernetes cluster. For a more robust setup using cloud-config see the [Installation Guide](docs/installation.md).
### Install Kubernetes binaries
```
sudo mkdir -p /opt/bin
sudo wget https://storage.googleapis.com/kubernetes/binaries.tar.gz
sudo tar -xvf binaries.tar.gz -C /opt/bin
```
### Add the Kubernetes systemd units
```
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
sudo cp kubernetes/docs/getting-started-guides/coreos/units/* /etc/systemd/system/
```
### Start the Kubernetes services
```
sudo systemctl start apiserver
sudo systemctl start scheduler
sudo systemctl start controller-manager
sudo systemctl start kubelet
sudo systemctl start proxy
```
### Running commands remotely
Setup a SSH tunnel to the Kubernetes API Server.
```
sudo ssh -f -nNT -L 8080:127.0.0.1:8080 core@${APISERVER}
```
Download a kubecfg client
**Darwin**
```
curl -o /usr/local/bin/kubecfg https://storage.googleapis.com/kubernetes/darwin/kubecfg
chmod +x /usr/local/bin/kubecfg
```
**Linux**
```
wget https://storage.googleapis.com/kubernetes/kubecfg -O /usr/local/bin/kubecfg
```
Issue commands remotely using the kubecfg command line tool.
```
kubecfg list /pods
```

View File

@ -0,0 +1,17 @@
[Unit]
ConditionFileIsExecutable=/opt/bin/apiserver
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/apiserver \
--address=127.0.0.1 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--machines=127.0.0.1 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,15 @@
[Unit]
ConditionFileIsExecutable=/opt/bin/controller-manager
Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/controller-manager \
--master=127.0.0.1:8080 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,11 @@
[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

View File

@ -0,0 +1,23 @@
[Unit]
After=network-online.target
Before=apiserver.service
Before=controller-manager.service
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/apiserver
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/controller-manager
ExecStart=/usr/bin/wget -N -P /opt/bin http://storage.googleapis.com/kubernetes/kubecfg
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/apiserver
ExecStart=/usr/bin/chmod +x /opt/bin/controller-manager
ExecStart=/usr/bin/chmod +x /opt/bin/kubecfg
ExecStart=/usr/bin/chmod +x /opt/bin/kubelet
ExecStart=/usr/bin/chmod +x /opt/bin/proxy
RemainAfterExit=yes
Type=oneshot

View File

@ -0,0 +1,17 @@
[Unit]
ConditionFileIsExecutable=/opt/bin/kubelet
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/kubelet \
--address=127.0.0.1 \
--port=10250 \
--hostname_override=127.0.0.1 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
[Unit]
ConditionFileIsExecutable=/opt/bin/proxy
Description=Kubernetes Proxy
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
ExecStart=/opt/bin/proxy --etcd_servers=http://127.0.0.1:4001 --logtostderr=true
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,16 @@
[Unit]
After=apiserver.service
ConditionFileIsExecutable=/opt/bin/scheduler
Description=Kubernetes Scheduler
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Wants=apiserver.service
[Service]
ExecStart=/opt/bin/scheduler \
--logtostderr=true \
--master=127.0.0.1:8080
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target