Hello everyone,
I'm trying to build a custom image using Packer where K3s runs inside the exported OVF file. During the Packer build process, the installation completes successfully, and K3s is running as expected.
However, after exporting the OVF file and importing it into VMware, K3s is no longer working. I'm getting a connection refused error on port 6443. Even after disabling the firewall, the issue persists.
For K3s installation, I'm using the following shell script with the curl command during the build process:
curl -sfL https://get.k3s.io | sh -
Could someone please guide me on what might be going wrong or what I might be missing?
Here is the Packer code I’m using: https://pastebin.com/M9mC1Drg
Thank you!
Just install the K3s binary and create a systemd service to install it on the VM's first boot. This way, K3s will initialize properly with the VM’s real IP and hostname. That’s why port 6443 works after import.
If you run it during the build, it binds to the wrong environment and breaks after cloning.
Just install the K3s binary and create a systemd service to install it on the VM's first boot. This way, K3s will initialize properly with the VM’s real IP and hostname. That’s why port 6443 works after import.
If you run it during the build, it binds to the wrong environment and breaks after cloning.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.