khuedoan-homelab/metal/roles/k3s/templates/k3s.service.j2

25 lines
637 B
Plaintext
Raw Normal View History

2021-09-01 04:19:05 +07:00
[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network-online.target
[Service]
Type=notify
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
2021-09-01 04:58:47 +07:00
ExecStart=/usr/local/bin/k3s {{ 'server' if 'masters' in group_names else 'agent' }}
2021-09-01 04:19:05 +07:00
KillMode=process
Delegate=yes
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target