| 1 | # slightly modified from: |
| 2 | # https://github.com/kubernetes/kubernetes/blob/ba8fcafaf8c502a454acd86b728c857932555315/build/debs/kubelet.service |
| 3 | [Unit] |
| 4 | Description=kubelet: The Kubernetes Node Agent |
| 5 | Documentation=http://kubernetes.io/docs/ |
| 6 | # NOTE: kind deviates from upstream here to avoid crashlooping |
| 7 | # This does *not* support altering the kubelet config path though. |
| 8 | # We intend to upstream this change but first need to solve the upstream |
| 9 | # Packaging problem (all kubernetes versions use the same files out of tree). |
| 10 | ConditionPathExists=/var/lib/kubelet/config.yaml |
| 11 | |
| 12 | [Service] |
| 13 | ExecStart=/usr/bin/kubelet |
| 14 | Restart=always |
| 15 | StartLimitInterval=0 |
| 16 | # NOTE: kind deviates from upstream here with a lower RestartSec |
| 17 | RestartSec=1s |
| 18 | # And by adding the [Service] lines below |
| 19 | CPUAccounting=true |
| 20 | MemoryAccounting=true |
| 21 | Slice=kubelet.slice |
| 22 | KillMode=process |
| 23 | |
| 24 | [Install] |
| 25 | WantedBy=multi-user.target |