Skip to content

Instantly share code, notes, and snippets.

@rimusz
Forked from kelseyhightower/gist:a5fde8bd36c724a33530
Last active August 29, 2015 14:23
Show Gist options
  • Save rimusz/2851ffccdbb46a5a1b32 to your computer and use it in GitHub Desktop.
Save rimusz/2851ffccdbb46a5a1b32 to your computer and use it in GitHub Desktop.

Kubernetes on Rocket

API Service

/etc/systemd/system/kube-apiserver.service
[Unit]
Description=Kubernetes API Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=etcd2.service
After=etcd2.service

[Service]
ExecStart=/usr/bin/rkt -insecure-skip-verify run \
 http://storage.googleapis.com/rktscience/kube-apiserver-0.19.0.aci \
 -- \
 --etcd-servers=http://127.0.0.1:2379 \
 --insecure-bind-address=0.0.0.0 \
 --insecure-port=8080 \
 --logtostderr=true \
 --service-cluster-ip-range=10.200.20.0/24 \
 --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Controller Manager

/etc/systemd/system/kube-controller-manager.service
[Unit]
Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=kube-apiserver.service
After=kube-apiserver.service

[Service]
ExecStart=/usr/bin/rkt --insecure-skip-verify run \
 http://storage.googleapis.com/rktscience/kube-controller-manager-0.19.0.aci \
 -- \
 --logtostderr=true \
 --master=http://127.0.0.1:8080 \
 --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Proxy

/etc/systemd/system/kube-proxy.service 
[Unit]
Description=Kubernetes Proxy
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=kube-apiserver.service
After=kube-apiserver.service

[Service]
ExecStart=/usr/bin/rkt --insecure-skip-verify run \
 http://storage.googleapis.com/rktscience/kube-proxy-0.19.0.aci \
 -- \
 --logtostderr=true \
 --master=http://127.0.0.1:8080 \
 --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Scheduler

/etc/systemd/system/kube-scheduler.service
[Unit]
Description=Kubernetes Scheduler
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=kube-apiserver.service
After=kube-apiserver.service

[Service]
ExecStart=/usr/bin/rkt --insecure-skip-verify run \
 http://storage.googleapis.com/rktscience/kube-scheduler-0.19.0.aci \
 -- \
 --logtostderr=true \
 --master=http://127.0.0.1:8080 \
 --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Kubelet

/etc/systemd/system/kubelet.service
[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=docker.service
After=docker.service
Requires=kube-apiserver.service
After=kube-apiserver.service

[Service]
ExecStart=/usr/bin/rkt --insecure-skip-verify run \
 http://storage.googleapis.com/rktscience/kubelet-0.19.0.aci \
 --volume root,kind=host,source=/ \
 --volume kubernetes-manifests,kind=host,source=/etc/kubernetes/manifests \
 --volume sys,kind=host,source=/sys \
 --volume var-lib-docker,kind=host,source=/var/lib/docker \
 --volume var-lib-kubelet,kind=host,source=/var/lib/kubelet \
 --volume var-run,kind=host,source=/var/run \
 --volume resolv-conf,kind=host,source=/etc/resolv.conf \
 -- \
 --address=0.0.0.0 \
 --api-servers=http://localhost:8080 \
 --containerized \
 --enable-server \
 --hostname-override=127.0.0.1 \
 --config=/etc/kubernetes/manifests \
 --machine-id-file=/rootfs/etc/machine-id \
 --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment