https://rancher.com/ logo
Title
j

jolly-state-39751

03/23/2023, 4:08 PM
Would you expect k3s to install & run on an AWS ec2 RHEL9 instance? I'm hitting a cryptic (to me) error when the service goes to start:
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO]  systemd: Starting k3s
Job for k3s.service failed because the control process exited with error code.
See "systemctl status k3s.service" and "journalctl -xeu k3s.service" for details.
[root@jb-rhel9 ~]# systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2023-03-23 15:43:07 UTC; 1s ago
       Docs: <https://k3s.io>
    Process: 52199 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=1/FAILURE)
        CPU: 8ms
[root@jb-rhel9 ~]# systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2023-03-23 15:43:23 UTC; 3s ago
       Docs: <https://k3s.io>
    Process: 52207 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=1/FAILURE)
        CPU: 7ms
my troubleshooting:
[root@jb-rhel9 ~]# /bin/sh -xc ! /usr/bin/systemctl is-enabled  nm-cloud-setup.service
[root@jb-rhel9 ~]# echo $?
1
[root@jb-rhel9 ~]# /usr/bin/systemctl is-enabled  nm-cloud-setup.service
enabled
[root@jb-rhel9 ~]# echo $?
0
I'm thinking k3s is refusing to start because the cloud setup service is enabled? This is a poorly handled error if that is the case (a human readable message would be helpful, or doc or other check during prereq checks). If I remove this check install and startup seems to work. I have other installs on rhel 7.8 ec2 instances that work fine but from the doc it appears there may be no official support for rhel 7?
c

creamy-pencil-82913

03/23/2023, 4:15 PM
https://docs.k3s.io/advanced#red-hat-enterprise-linux--centos
If enabled, it is required to disable nm-cloud-setup and reboot the node:
```systemctl disable nm-cloud-setup.service nm-cloud-setup.timer
reboot```
j

jolly-state-39751

03/23/2023, 4:18 PM
Thanks @creamy-pencil-82913 - very appreciative of the doc link --- I looked but guess there was too much of a hurry and missed that. Thank you.