From ba8a1553f55de7cb2bf944c7d2c1b6767f4eb7df Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Fri, 17 Nov 2023 17:04:33 +0100 Subject: [PATCH] Try installing kernel via packages in cloud init script --- .../modules/k8s-cluster/templates/cloud-init-k8s-manager.tftpl | 2 ++ .../modules/k8s-cluster/templates/cloud-init-k8s-worker.tftpl | 2 ++ .../modules/k8s-cluster/templates/scripts/install-packages.sh | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/terraform/modules/k8s-cluster/templates/cloud-init-k8s-manager.tftpl b/terraform/modules/k8s-cluster/templates/cloud-init-k8s-manager.tftpl index da1c70b..bc693a0 100644 --- a/terraform/modules/k8s-cluster/templates/cloud-init-k8s-manager.tftpl +++ b/terraform/modules/k8s-cluster/templates/cloud-init-k8s-manager.tftpl @@ -11,6 +11,8 @@ users: sudo: ALL=(ALL) NOPASSWD:ALL ssh_authorized_keys: - ${terraform_public_ssh_key} +packages: + - linux-generic-hwe-22.04 package_update: true package_upgrade: true package_reboot_if_required: true diff --git a/terraform/modules/k8s-cluster/templates/cloud-init-k8s-worker.tftpl b/terraform/modules/k8s-cluster/templates/cloud-init-k8s-worker.tftpl index 8a2b52a..dca9317 100644 --- a/terraform/modules/k8s-cluster/templates/cloud-init-k8s-worker.tftpl +++ b/terraform/modules/k8s-cluster/templates/cloud-init-k8s-worker.tftpl @@ -11,6 +11,8 @@ users: sudo: ALL=(ALL) NOPASSWD:ALL ssh_authorized_keys: - ${terraform_public_ssh_key} +packages: + - linux-generic-hwe-22.04 package_update: true package_upgrade: true package_reboot_if_required: true diff --git a/terraform/modules/k8s-cluster/templates/scripts/install-packages.sh b/terraform/modules/k8s-cluster/templates/scripts/install-packages.sh index 057d4ab..f6b7087 100644 --- a/terraform/modules/k8s-cluster/templates/scripts/install-packages.sh +++ b/terraform/modules/k8s-cluster/templates/scripts/install-packages.sh @@ -3,7 +3,6 @@ apt-get -y install fail2ban apt-get -y install ufw apt-get -y install snapd -apt-get -y install linux-generic-hwe-22.04 curl https://packages.hetzner.com/hcloud/deb/hc-utils_0.0.4-1_all.deb -o /run/tmpfiles.d/hc-utils_0.0.4-1_all.deb -s apt-get -y install /run/tmpfiles.d/hc-utils_0.0.4-1_all.deb