Some image based OS do not allow writing to /. Since the kubelet looks for .dockercfg files in the working dir and uses / as the working dir, this means one can never set a .dockercfg on those distros. This moves the kubelet working dir to /var/lib/kubelet, where the kubelet naturally does its work.
24 lines
586 B
Desktop File
24 lines
586 B
Desktop File
[Unit]
|
|
Description=Kubernetes Kubelet Server
|
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
|
After=docker.service cadvisor.service
|
|
Requires=docker.service
|
|
|
|
[Service]
|
|
WorkingDirectory=/var/lib/kubelet
|
|
EnvironmentFile=-/etc/kubernetes/config
|
|
EnvironmentFile=-/etc/kubernetes/kubelet
|
|
ExecStart=/usr/bin/kubelet \
|
|
${KUBE_LOGTOSTDERR} \
|
|
${KUBE_LOG_LEVEL} \
|
|
${KUBE_ETCD_SERVERS} \
|
|
${KUBELET_ADDRESS} \
|
|
${KUBELET_PORT} \
|
|
${KUBELET_HOSTNAME} \
|
|
${KUBE_ALLOW_PRIV} \
|
|
${KUBELET_ARGS}
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|