k3s install method ok

This commit is contained in:
Karim Naufal
2022-02-16 04:24:20 +01:00
parent fec695086a
commit d920132694
5 changed files with 27 additions and 27 deletions

View File

@@ -43,7 +43,19 @@ locals {
"mkdir -p /etc/rancher/k3s",
# move the config file into place
"mv /tmp/config.yaml /etc/rancher/k3s/config.yaml",
# install k3s
"INSTALL_K3S_SKIP_START=true curl -sfL https://get.k3s.io | sh -",
# install k3s server
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=server sh -",
]
install_k3s_agent = [
"set -ex",
# first we disable automatic reboot (after transactional updates), and configure the reboot method as kured
"rebootmgrctl set-strategy off && echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
# prepare the k3s config directory
"mkdir -p /etc/rancher/k3s",
# move the config file into place
"mv /tmp/config.yaml /etc/rancher/k3s/config.yaml",
# install k3s server
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=agent sh -",
]
}