0

I am trying to install k3s on a redhat operating system, on an EC2 instance (t3.xlarge)

OS version:

$ cat /etc/*release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"

I install mysql on the server. These are the installation commands:

export K3S_DATASTORE_ENDPOINT='mysql://user:password@tcp(localhost:3306)/db_name'
curl -sfL https://get.k3s.io | sh -s - server --node-taint CriticalAddonsOnly=true:NoExecute --tls-san locahost

However I am getting errors:

$ 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 Sun 2022-09-11 15:03:05 UTC; 5s ago
     Docs: https://k3s.io
  Process: 71759 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=1/FAILURE)

Sep 11 15:03:05 ip-172-31-28-136.eu-central-1.compute.internal systemd[1]: k3s.service: Failed with result 'exit-code'.
Sep 11 15:03:05 ip-172-31-28-136.eu-central-1.compute.internal systemd[1]: Failed to start Lightweight Kubernetes.
Sep 11 15:03:10 ip-172-31-28-136.eu-central-1.compute.internal systemd[1]: k3s.service: Service RestartSec=5s expired, scheduling restart.
Sep 11 15:03:10 ip-172-31-28-136.eu-central-1.compute.internal systemd[1]: k3s.service: Scheduled restart job, restart counter is at 109.
Sep 11 15:03:10 ip-172-31-28-136.eu-central-1.compute.internal systemd[1]: Stopped Lightweight Kubernetes.

However I manage to run manually using:

k3s server

Which results:

$ k3s kubectl get nodes
NAME                                             STATUS   ROLES                  AGE   VERSION
ip-172-31-28-136.eu-central-1.compute.internal   Ready    control-plane,master   14m   v1.24.4+k3s1

What is the issue?

justadev
  • 303
  • 1
  • 4
  • 14

0 Answers0