Skip to content

Instantly share code, notes, and snippets.

@brianm

brianm/kubby.service

Last active Sep 27, 2017
Embed
What would you like to do?
[Unit]
Description=standalone kubelet
After=docker.service
Requires=docker.service
[Service]
User=root
ExecStartPre=-/bin/docker kill kubby
ExecStartPre=-/bin/docker rm kubby
ExecStartPre=-/bin/docker create \
--net=host \
--pid=host \
--privileged \
--name kubby \
-v /dev:/dev \
-v /sys:/sys:ro \
-v /var/run:/var/run:rw \
-v /var/lib/docker/:/var/lib/docker:rw \
-v /var/lib/kubelet/:/var/lib/kubelet:shared \
-v /var/log:/var/log:shared \
-v /etc/kubernetes:/etc/kubernetes:ro \
gcr.io/google_containers/hyperkube-amd64:v1.7.6 \
/kubelet --pod-manifest-path=/etc/kubernetes/manifests \
--sync-frequency 30s \
--minimum-image-ttl-duration 300s \
--file-check-frequency 30s \
--allow-privileged
ExecStart=/bin/docker start -a kubby
ExecStop=/usr/bin/docker stop -t 10 kubby
[Install]
WantedBy=multi-user.target
@brianm

This comment has been minimized.

Copy link
Owner Author

@brianm brianm commented Sep 27, 2017

^^ quick hack, only tested on Centos7.

I don't love the --net=host and hostNetwork=true approach as it makes running more than one pod pretty dodgy. That said, quick hack and running standalone kubelet is pretty special case :-)

nota bene: need hostNetwork=true in your manifests :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.