2021-08-25 04:33:56 +00:00
|
|
|
Description=Lightweight Kubernetes
|
|
|
|
Documentation=https://k3s.io
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=notify
|
|
|
|
ExecStartPre=-/sbin/modprobe br_netfilter
|
|
|
|
ExecStartPre=-/sbin/modprobe overlay
|
2021-12-15 01:55:52 +00:00
|
|
|
ExecStart=/usr/local/bin/k3s agent --server https://{{ hostvars[groups['k3s-server'][0]]['ansible_facts']['default_ipv4']['address'] }}:6443 --token {{ hostvars[groups['k3s-server'][0]]['token'] }} {{ k3s.extra_agent_args | default("") }} {{ k3s_extra_args }}
|
2021-08-25 04:33:56 +00: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
|