Skip to content

Instantly share code, notes, and snippets.

Last active September 27, 2017 23:36
What would you like to do?
Description=standalone kubelet
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 \ \
/kubelet --pod-manifest-path=/etc/kubernetes/manifests \
--sync-frequency 30s \
--minimum-image-ttl-duration 300s \
--file-check-frequency 30s \
ExecStart=/bin/docker start -a kubby
ExecStop=/usr/bin/docker stop -t 10 kubby
Copy link

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