Add K3s agent setup with NVMe-backed persistent storage
Bind-mount K3s agent data, node identity, and kubelet dirs from NVMe so container image cache and node registration survive reboots on the diskless netboot nodes. Includes K3s binary download, agent systemd service, DHCP hostname resolution, and open-iscsi for Longhorn iSCSI support.
This commit is contained in:
25
files/k3s-agent.service
Normal file
25
files/k3s-agent.service
Normal file
@@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=Lightweight Kubernetes (K3s Agent)
|
||||
Documentation=https://k3s.io
|
||||
After=network-online.target setup-node-storage.service set-hostname-from-dhcp.service
|
||||
Wants=network-online.target
|
||||
Requires=setup-node-storage.service set-hostname-from-dhcp.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/etc/rancher/k3s/k3s-agent.env
|
||||
ExecStartPre=/sbin/modprobe br_netfilter
|
||||
ExecStartPre=/sbin/modprobe overlay
|
||||
ExecStart=/usr/local/bin/k3s agent
|
||||
KillMode=process
|
||||
Delegate=yes
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=infinity
|
||||
LimitCORE=infinity
|
||||
TasksMax=infinity
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user