How to enable service startup after installation?

Hi folks,

I’m new here and delighted to have discovered the easiest and fastest way to get to a running k8s cluster ever!

I installed in a proxmox virtual environment using the iso. I add any flags and used a config.yaml very similar to the example. After installation the service is not started on boot of the node. The OS environment is appropriately very minimal and appears to be an openrc based init system. I’m just making sure I know how to enable boot time loading of the k8s services. could it jsut be as simple as issuing rc-update add k3s-service to master and all nodes ? or do I need to do anything else?

Thanks in advance for any help.

after adding the k3s-service the server isn’t started after a reboot. I get the following from rc-status:

k3s-master [/home/rancher]$ rc-status
Runlevel: default
ccapply [ crashed ]
k3s-service [ started 00:00:02 (7) ]
iscsid [ started ]
sshd [ started ]
local [ started ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
sysfs [ started ]
fsck [ started ]
root [ started ]
localmount [ started ]
net-online [ started ]
cgroups [ started ]
Dynamic Runlevel: manual

I see it states it crashed, so the k3s server is started, but for some reason it crashes. Check /var/log/k3s-service.log to find a possible reason.

I recently had the problem, where k3s server crashed but I noticed that whilst it tried restarting a couple of times, it stopped doing that after a while.

The reason it crashed, is I used a mysql backend, which goes down for backup every night (not optimal, but for this setup, the api being offline for a couple of minutes is not a problem.)

But k3s stopping to be restarted was a problem. I solved this by tweaking the openrc init file, and this fix will soon be applied upstream (