adamant-kite-43734
11/16/2023, 8:24 PMfierce-magician-45581
11/16/2023, 8:26 PMcreamy-pencil-82913
11/16/2023, 8:26 PMcreamy-pencil-82913
11/16/2023, 8:26 PMcreamy-pencil-82913
11/16/2023, 8:26 PMfierce-magician-45581
11/16/2023, 8:27 PMfierce-magician-45581
11/16/2023, 8:31 PMk3s@atul-miniserver-k3s:~$ curl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION="1.27.7" INSTALL_K3S_EXEC="server --tls-san X.X.X.X --disable=traefik" sh -
[INFO] Using 1.27.7 as release
[INFO] Downloading hash <https://github.com/k3s-io/k3s/releases/download/1.27.7/sha256sum-amd64.txt>
k3s@atul-miniserver-k3s:~$
creamy-pencil-82913
11/16/2023, 8:34 PM1.27.7
is not a valid K3s versioncreamy-pencil-82913
11/16/2023, 8:34 PMv1.27.7+k3s1
?fierce-magician-45581
11/16/2023, 8:41 PM1.27.7
works but with sudo
, seems like script is misbehaving -
k3s@atul-miniserver-k3s:~$ curl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION="1.27.7" INSTALL_K3S_EXEC="server --tls-san X.X.X.X --disable=traefik" sudo sh -
[INFO] Finding release for channel stable
[INFO] Using v1.27.7+k3s2 as release
[INFO] Downloading hash <https://github.com/k3s-io/k3s/releases/download/v1.27.7+k3s2/sha256sum-amd64.txt>
[INFO] Skipping binary downloaded, installed k3s matches hash
[INFO] Skipping installation of SELinux RPM
[INFO] Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO] Skipping /usr/local/bin/crictl symlink to k3s, already exists
[INFO] Skipping /usr/local/bin/ctr symlink to k3s, already exists
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] No change detected so skipping service start
k3s@atul-miniserver-k3s:~$ exit
creamy-pencil-82913
11/16/2023, 9:08 PMcreamy-pencil-82913
11/16/2023, 9:09 PM[INFO] No change detected so skipping service startyou’ve reinstalled the same version with the same config so it’s not restarting the service
fierce-magician-45581
11/16/2023, 9:12 PMINSTALL_K3S_EXEC
script does not honour the above env when used with sudo
, tried with sudo sh -E -
as well, no luck
If i do not pass this variable, k3s is installed successfully but again with sudo
without sudo
it do not do anything.creamy-pencil-82913
11/16/2023, 9:12 PMfierce-magician-45581
11/16/2023, 9:13 PMcreamy-pencil-82913
11/16/2023, 9:14 PM/etc/systemd/system/k3s.service
? If so, then the install script is working.fierce-magician-45581
11/16/2023, 9:27 PMk3s@atul-miniserver-k3s:~$ cat /etc/systemd/system/k3s.service
[Unit]
Description=Lightweight Kubernetes
Documentation=<https://k3s.io>
Wants=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=notify
EnvironmentFile=-/etc/default/%N
EnvironmentFile=-/etc/sysconfig/%N
EnvironmentFile=-/etc/systemd/system/k3s.service.env
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
ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service'
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s \
server \
k3s@atul-miniserver-k3s:~$
creamy-pencil-82913
11/16/2023, 9:41 PMsudo sh
creamy-pencil-82913
11/16/2023, 9:41 PMcreamy-pencil-82913
11/16/2023, 9:41 PMcurl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION="v1.27.7+k3s1" INSTALL_K3S_EXEC="server --tls-san X.X.X.X --disable=traefik" sh -s -
fierce-magician-45581
11/16/2023, 9:42 PMsh
without sudo
creamy-pencil-82913
11/16/2023, 9:42 PMcreamy-pencil-82913
11/16/2023, 9:42 PMcreamy-pencil-82913
11/16/2023, 9:43 PMfierce-magician-45581
11/16/2023, 9:43 PMcreamy-pencil-82913
11/16/2023, 9:43 PMsystemd-node-1:/ # curl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION="v1.27.7+k3s1" INSTALL_K3S_EXEC="server --tls-san X.X.X.X --disable=traefik" sh -s -
[INFO] Using v1.27.7+k3s1 as release
[INFO] Downloading hash <https://github.com/k3s-io/k3s/releases/download/v1.27.7+k3s1/sha256sum-amd64.txt>
[INFO] Downloading binary <https://github.com/k3s-io/k3s/releases/download/v1.27.7+k3s1/k3s>
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Skipping installation of SELinux RPM
[INFO] Creating /usr/local/bin/kubectl symlink to k3s
[INFO] Creating /usr/local/bin/crictl symlink to k3s
[INFO] Creating /usr/local/bin/ctr symlink to k3s
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] systemd: Starting k3s
systemd-node-1:/ # cat /etc/systemd/system/k3s.service
[Unit]
Description=Lightweight Kubernetes
Documentation=<https://k3s.io>
Wants=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=notify
EnvironmentFile=-/etc/default/%N
EnvironmentFile=-/etc/sysconfig/%N
EnvironmentFile=-/etc/systemd/system/k3s.service.env
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
ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service'
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s \
server \
'--tls-san' \
'X.X.X.X' \
'--disable=traefik' \
fierce-magician-45581
11/16/2023, 9:49 PMsh -s
option worked, I think, we should update the github read me -
https://github.com/k3s-io/k3s#quick-start---install-scriptfierce-magician-45581
11/16/2023, 9:53 PMcreamy-pencil-82913
11/16/2023, 9:53 PMsh
on this box busybox or something?fierce-magician-45581
11/16/2023, 9:54 PMGCP machine
which has debian-12 boot image
creamy-pencil-82913
11/16/2023, 9:56 PMfierce-magician-45581
11/16/2023, 9:57 PMINSTALL_K3S_EXEC
env variablecreamy-pencil-82913
11/16/2023, 10:08 PMcreamy-pencil-82913
11/16/2023, 10:08 PMcurl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION="v1.27.7+k3s1" INSTALL_K3S_EXEC="server --tls-san X.X.X.X --disable=traefik" sh -x -