Last active
September 27, 2017 23:36
-
-
Save brianm/b560188bdb8adb58796a2aa3322d2394 to your computer and use it in GitHub Desktop.
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
[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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
^^ quick hack, only tested on Centos7.
I don't love the
--net=host
andhostNetwork=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