kube-hetzner / terraform-hcloud-kube-hetzner

Optimized and Maintenance-free Kubernetes on Hetzner Cloud in one command!
MIT License
2.41k stars 372 forks source link

[Bug]: /usr/share/selinux/packages/k3s.pp (No such file or directory) #1481

Closed geeksven-dev closed 2 months ago

geeksven-dev commented 2 months ago

Description

Hi team,

I am currently trying to setup a very small kube hetzner cluster but unfortunately my control plane dies when trying to configure selinux.

module.kube-hetzner.hcloud_placement_group.agent[0]: Creating...
module.kube-hetzner.hcloud_network.k3s[0]: Creating...
module.kube-hetzner.hcloud_placement_group.control_plane[0]: Creating...
module.kube-hetzner.hcloud_load_balancer.cluster[0]: Creating...
module.kube-hetzner.hcloud_ssh_key.k3s[0]: Creating...
module.kube-hetzner.hcloud_firewall.k3s: Creating...
module.kube-hetzner.random_password.k3s_token: Creating...
module.kube-hetzner.random_password.rancher_bootstrap[0]: Creating...
module.kube-hetzner.local_file.kustomization_backup[0]: Creating...
module.kube-hetzner.local_file.kustomization_backup[0]: Creation complete after 0s [id=69b9304fa9749abf99099fc766e69d23a5fa850b]
module.kube-hetzner.random_password.k3s_token: Creation complete after 0s [id=none]
module.kube-hetzner.random_password.rancher_bootstrap[0]: Creation complete after 0s [id=none]
module.kube-hetzner.hcloud_ssh_key.k3s[0]: Creation complete after 0s [id=23019614]
module.kube-hetzner.hcloud_network.k3s[0]: Creation complete after 0s [id=10136132]
module.kube-hetzner.data.hcloud_network.k3s: Reading...
module.kube-hetzner.data.hcloud_network.k3s: Read complete after 0s [name=arm-cluster]
module.kube-hetzner.hcloud_network_subnet.agent[0]: Creating...
module.kube-hetzner.hcloud_network_subnet.control_plane[0]: Creating...
module.kube-hetzner.hcloud_placement_group.agent[0]: Creation complete after 0s [id=388825]
module.kube-hetzner.hcloud_placement_group.control_plane[0]: Creation complete after 1s [id=388826]
module.kube-hetzner.hcloud_firewall.k3s: Creation complete after 1s [id=1611383]
module.kube-hetzner.hcloud_network_subnet.agent[0]: Creation complete after 1s [id=10136132-10.0.0.0/16]
module.kube-hetzner.module.agents["0-1-worker-nodes"].random_string.identity_file: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].random_string.identity_file: Creation complete after 0s [id=ocv37qivxgfuivxmut46]
module.kube-hetzner.module.agents["0-0-worker-nodes"].random_string.identity_file: Creating...
module.kube-hetzner.module.agents["0-0-worker-nodes"].random_string.server: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].random_string.server: Creating...
module.kube-hetzner.module.agents["0-0-worker-nodes"].random_string.identity_file: Creation complete after 0s [id=mskh068rm0buhhupqz8d]
module.kube-hetzner.module.agents["0-1-worker-nodes"].random_string.server: Creation complete after 0s [id=bjt]
module.kube-hetzner.module.agents["0-0-worker-nodes"].random_string.server: Creation complete after 0s [id=foh]
module.kube-hetzner.module.agents["0-1-worker-nodes"].data.cloudinit_config.config: Reading...
module.kube-hetzner.module.agents["0-0-worker-nodes"].data.cloudinit_config.config: Reading...
module.kube-hetzner.module.agents["0-1-worker-nodes"].data.cloudinit_config.config: Read complete after 0s [id=2213371232]
module.kube-hetzner.module.agents["0-0-worker-nodes"].data.cloudinit_config.config: Read complete after 0s [id=2061847970]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Creating...
module.kube-hetzner.hcloud_network_subnet.control_plane[0]: Creation complete after 1s [id=10136132-10.255.0.0/16]
module.kube-hetzner.module.control_planes["0-0-control-plane"].random_string.identity_file: Creating...
module.kube-hetzner.module.control_planes["0-0-control-plane"].random_string.server: Creating...
module.kube-hetzner.module.control_planes["0-0-control-plane"].random_string.identity_file: Creation complete after 0s [id=hxomme85amu13a2hjifa]
module.kube-hetzner.module.control_planes["0-0-control-plane"].random_string.server: Creation complete after 0s [id=ztl]
module.kube-hetzner.module.control_planes["0-0-control-plane"].data.cloudinit_config.config: Reading...
module.kube-hetzner.module.control_planes["0-0-control-plane"].data.cloudinit_config.config: Read complete after 0s [id=2670598515]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Creating...
module.kube-hetzner.hcloud_load_balancer.cluster[0]: Creation complete after 2s [id=2055435]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [10s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [10s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [10s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [20s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [20s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [20s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [30s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [30s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [30s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [40s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [40s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [40s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [50s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [50s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [50s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m0s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m0s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m0s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m10s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m10s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m10s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m20s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m20s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m20s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m30s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m30s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m30s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m40s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m40s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m40s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [1m50s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [1m50s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [1m50s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [2m0s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [2m0s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [2m0s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Still creating... [2m10s elapsed]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Still creating... [2m10s elapsed]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Still creating... [2m10s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (local-exec): (output suppressed due to sensitive value in config)
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "until ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PubkeyAuthentication=yes -i /tmp/ocv37qivxgfuivxmut46 -o ConnectTimeout=2 -p 22 root@167.235.241.225 true 2> /dev/null\ndo\n  echo \"Waiting for MicroOS to become available...\"\n  sleep 3\ndone\n"]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (local-exec): Waiting for MicroOS to become available...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (local-exec): (output suppressed due to sensitive value in config)
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "until ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PubkeyAuthentication=yes -i /tmp/hxomme85amu13a2hjifa -o ConnectTimeout=2 -p 22 root@49.13.209.100 true 2> /dev/null\ndo\n  echo \"Waiting for MicroOS to become available...\"\n  sleep 3\ndone\n"]   
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (local-exec): (output suppressed due to sensitive value in config)
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "until ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PubkeyAuthentication=yes -i /tmp/mskh068rm0buhhupqz8d -o ConnectTimeout=2 -p 22 root@49.13.56.90 true 2> /dev/null\ndo\n  echo \"Waiting for MicroOS to become available...\"\n  sleep 3\ndone\n"]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "rm /tmp/hxomme85amu13a2hjifa\n"]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Provisioning with 'remote-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Host: 49.13.209.100
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   User: root
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Password: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Private key: true
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Certificate: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   SSH Agent: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec):   Target Platform: unix
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec): Connected!
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "rm /tmp/mskh068rm0buhhupqz8d\n"]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Host: 49.13.56.90
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   User: root
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec):   Target Platform: unix
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server (remote-exec): Automatic OS updates are enabled
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec): Connected!
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server.server: Creation complete after 2m12s [id=53052229]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server_network.server: Creating...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries: Creating...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Creating...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries: Provisioning with 'file'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server (remote-exec): Automatic OS updates are enabled
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries: Provisioning with 'remote-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Host: 49.13.209.100
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   User: root
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Password: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Private key: true
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Certificate: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   SSH Agent: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server.server: Creation complete after 2m13s [id=53052230]
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server_network.server: Creating...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries: Creating...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Creating...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec): Connected!
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Host: 49.13.56.90
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   User: root
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec):   Target Platform: unix
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec): Connected!
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries (remote-exec): No update required to the registries.yaml file
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.registries: Creation complete after 2s [id=2622824484154294367]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (local-exec): Waiting for MicroOS to become available...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Provisioning with 'remote-exec'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Host: 49.13.209.100
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   User: root
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Password: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Private key: true
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Certificate: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   SSH Agent: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram (remote-exec): Connected!
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries (remote-exec): No update required to the registries.yaml file
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.registries: Creation complete after 1s [id=5877666174529048839]
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Host: 49.13.56.90
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   User: root
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram (remote-exec): Connected!
module.kube-hetzner.module.control_planes["0-0-control-plane"].null_resource.zram: Creation complete after 3s [id=8667474458936485694]
module.kube-hetzner.module.agents["0-0-worker-nodes"].null_resource.zram: Creation complete after 2s [id=2766917510401058569]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Provisioning with 'local-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (local-exec): Executing: ["/bin/sh" "-c" "rm /tmp/ocv37qivxgfuivxmut46\n"]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Host: 167.235.241.225
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   User: root
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec): Connected!
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server (remote-exec): Automatic OS updates are enabled
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server.server: Creation complete after 2m18s [id=53052228]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server_network.server: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries: Creating...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Host: 167.235.241.225
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   User: root
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec): Connected!
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries (remote-exec): No update required to the registries.yaml file
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Provisioning with 'remote-exec'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Host: 167.235.241.225
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   User: root
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.registries: Creation complete after 2s [id=5754570524505203809]
module.kube-hetzner.module.control_planes["0-0-control-plane"].hcloud_server_network.server: Creation complete after 9s [id=53052229-10136132]
module.kube-hetzner.null_resource.first_control_plane: Creating...
module.kube-hetzner.null_resource.first_control_plane: Provisioning with 'file'...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Host: 167.235.241.225
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   User: root
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Password: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Private key: true
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Certificate: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   SSH Agent: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Checking Host Key: false
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec):   Target Platform: unix
module.kube-hetzner.null_resource.first_control_plane: Provisioning with 'remote-exec'...
module.kube-hetzner.null_resource.first_control_plane (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Host: 49.13.209.100
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   User: root
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Password: false
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Private key: true
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Certificate: false
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   SSH Agent: false
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Checking Host Key: false
module.kube-hetzner.null_resource.first_control_plane (remote-exec):   Target Platform: unix
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram (remote-exec): Connected!
module.kube-hetzner.null_resource.first_control_plane (remote-exec): Connected!
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + /etc/cloud/rename_interface.sh
module.kube-hetzner.module.agents["0-1-worker-nodes"].null_resource.zram: Creation complete after 4s [id=5718738321883974887]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server_network.server: Still creating... [10s elapsed]
module.kube-hetzner.module.agents["0-1-worker-nodes"].hcloud_server_network.server: Creation complete after 9s [id=53052228-10136132]
module.kube-hetzner.module.agents["0-0-worker-nodes"].hcloud_server_network.server: Creation complete after 16s [id=53052230-10136132]
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"]: Creating...
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"]: Creating...
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"]: Provisioning with 'file'...
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"]: Provisioning with 'file'...
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"]: Provisioning with 'remote-exec'...
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Host: 49.13.56.90
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   User: root
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Password: false
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Private key: true
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Certificate: false
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   SSH Agent: false
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Checking Host Key: false
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec):   Target Platform: unix
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"]: Provisioning with 'remote-exec'...
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec): Connecting to remote host via SSH...
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Host: 167.235.241.225
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   User: root
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Password: false
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Private key: true
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Certificate: false
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   SSH Agent: false
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Checking Host Key: false
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec):   Target Platform: unix
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec): Connected!
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec): Connected!
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec): Updated config.yaml detected, restart of k3s service required
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec): Updated config.yaml detected, restart of k3s service required
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec): No active k3s or k3s-agent service found
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"] (remote-exec): k3s service or k3s-agent service (re)started successfully
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec): No active k3s or k3s-agent service found
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"] (remote-exec): k3s service or k3s-agent service (re)started successfully
module.kube-hetzner.null_resource.agent_config["0-0-worker-nodes"]: Creation complete after 1s [id=7726484061935198301]
module.kube-hetzner.null_resource.agent_config["0-1-worker-nodes"]: Creation complete after 1s [id=820816311006462405]
module.kube-hetzner.null_resource.first_control_plane: Still creating... [10s elapsed]
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + mkdir -p /etc/rancher/k3s
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + '[' -f /tmp/config.yaml ']'
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + mv /tmp/config.yaml /etc/rancher/k3s/config.yaml
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + chmod 0600 /etc/rancher/k3s/config.yaml
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + '[' -e /etc/rancher/k3s/k3s.yaml ']'
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + cat
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + set -a
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + source /etc/environment
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + set +a
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + cat
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + cat
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + timeout 180s /bin/sh -c 'while ! ping -c 1 1.1.1.1 >/dev/null 2>&1; do echo "Ready for k3s installation, waiting for a successful connection to the internet..."; sleep 5; done; echo Connected'
module.kube-hetzner.null_resource.first_control_plane (remote-exec): Connected
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + INSTALL_K3S_SKIP_START=true
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + INSTALL_K3S_SKIP_SELINUX_RPM=true
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + INSTALL_K3S_CHANNEL=v1.29
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + INSTALL_K3S_EXEC='server '
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + sh -
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + curl -sfL https://get.k3s.io
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Finding release for channel v1.29
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Using v1.29.8+k3s1 as release
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.29.8+k3s1/sha256sum-arm64.txt
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.29.8+k3s1/k3s-arm64
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Verifying binary download
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Installing k3s to /usr/local/bin/k3s
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Skipping installation of SELinux RPM
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Creating /usr/local/bin/kubectl symlink to k3s
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Creating /usr/local/bin/crictl symlink to k3s
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Creating /usr/local/bin/ctr symlink to k3s
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
module.kube-hetzner.null_resource.first_control_plane (remote-exec): [INFO]  systemd: Enabling k3s unit
module.kube-hetzner.null_resource.first_control_plane (remote-exec): Created symlink '/etc/systemd/system/multi-user.target.wants/k3s.service' → '/etc/systemd/system/k3s.service'.
module.kube-hetzner.null_resource.first_control_plane (remote-exec): + /sbin/semodule -v -i /usr/share/selinux/packages/k3s.pp
module.kube-hetzner.null_resource.first_control_plane (remote-exec): Attempting to install module '/usr/share/selinux/packages/k3s.pp':
module.kube-hetzner.null_resource.first_control_plane (remote-exec): libsemanage.map_compressed_file: Unable to open /usr/share/selinux/packages/k3s.pp
module.kube-hetzner.null_resource.first_control_plane (remote-exec):  (No such file or directory).
module.kube-hetzner.null_resource.first_control_plane (remote-exec): libsemanage.semanage_direct_install_file: Unable to read file /usr/share/selinux/packages/k3s.pp
module.kube-hetzner.null_resource.first_control_plane (remote-exec):  (No such file or directory).
module.kube-hetzner.null_resource.first_control_plane (remote-exec): /sbin/semodule:  Failed on /usr/share/selinux/packages/k3s.pp!
╷
│ Error: remote-exec provisioner error
│
│   with module.kube-hetzner.null_resource.first_control_plane,
│   on .terraform/modules/kube-hetzner/init.tf line 70, in resource "null_resource" "first_control_plane":
│   70:   provisioner "remote-exec" {
│
│ error executing "/tmp/terraform_142792576.sh": Process exited with status 1

Did someone also experience this? Or at least has a feasable solution? I also tried to disable selinux on the nodes but this did not have any effect.

Regards Sven

Kube.tf file

terraform {
  required_version = ">= 1.5.0"
  required_providers {
    hcloud = {
      source  = "hetznercloud/hcloud"
      version = ">= 1.43.0"
    }
  }
}

provider "hcloud" {
  token = var.hcloud_token
}

module "kube-hetzner" {
  providers = {
    hcloud = hcloud
  }
  hcloud_token = var.hcloud_token

  source = "kube-hetzner/kube-hetzner/hcloud"

  cluster_name = "arm-cluster"

  ssh_public_key  = file(var.ssh_public_key_path)
  ssh_private_key = file(var.ssh_private_key_path)

  network_region = "eu-central"

  # Control plane with one master node
  control_plane_nodepools = [
    {
      name        = "control-plane"
      server_type = "cax11"  # Smallest ARM instance type for master node
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 1
    }
  ]

  # Agent nodepool with two worker nodes
  agent_nodepools = [
    {
      name        = "worker-nodes"
      server_type = "cax11"  # Smallest ARM instance type for worker nodes
      location    = "fsn1"
      labels      = []
      taints      = []
      count       = 2
    }
  ]

  # Use NGINX ingress controller instead of the default Traefik
  ingress_controller = "nginx"

  load_balancer_type     = "lb11"
  load_balancer_location = "fsn1"
  initial_k3s_channel    = "v1.29"

  # Enable Cert-Manager to manage Let's Encrypt certificates
  enable_cert_manager = true

  # Custom configuration for Cert-Manager to use Let's Encrypt
  cert_manager_values = <<-EOT
    ingressShim:
      defaultIssuerName: letsencrypt-prod
      defaultIssuerKind: ClusterIssuer
      defaultIssuerGroup: cert-manager.io
  EOT
}

Screenshots

No response

Platform

Windows WSL - Ubuntu 22

geeksven-dev commented 2 months ago

Thanks to https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner/issues/1442#issuecomment-2277642718 I also found the solution in the known_hosts having different fingerprints than in my snapshotted images.

Long story short cleaing up the known_hosts and recreating the packer snapshots afterwards did the trick for me :)