summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/k3s/files/k3s.service')
-rw-r--r--sys-cluster/k3s/files/k3s.service24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-cluster/k3s/files/k3s.service b/sys-cluster/k3s/files/k3s.service
new file mode 100644
index 000000000000..3dfe301f7033
--- /dev/null
+++ b/sys-cluster/k3s/files/k3s.service
@@ -0,0 +1,24 @@
+[Unit]
+Description=Lightweight Kubernetes
+Documentation=https://k3s.io
+Wants=network-online.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=notify
+EnvironmentFile=-/etc/systemd/system/k3s.service.env
+Environment=CMD_K3S_EXEC="server"
+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
+ExecStart=/usr/bin/k3s $CMD_K3S_EXEC