Skip to content

Instantly share code, notes, and snippets.

@bcdurden
bcdurden / Airgapped_RKE2_image.md
Last active October 28, 2025 22:10
Create Harvester RKE2 Airgap-friendly Node Image via Packer

RKE2 and Packer

These files are configured in a way so that an Ubuntu cloud-image is modified by downloading the RKE2 install script from upstream as well as installing the qemu-guest-agent. This is done so the Ubuntu image can now function in an airgapped environment as an RKE2 node. Previous methods I've done involved using libguestfs tools and it was a bit clunky due to how it needed to be managed. Packer's QEMU provider fixes that for me.

Unfortunately, Packer's QEMU provider must run locally as there is no Harvester provider that would run these commands on a remote Harvester cluster to save us the dependency problem. Perhaps in the future we can explore that level of sophistication, but for now this works great.

There is a post-install provisioner that uploads the resulting image to Harvester using a VirtualMachineImage CR template. If you do not wish to upload to Harvester, feel free to comment out that section in spec.pkr.hcl, it is located towards the bottom and starts with the lines `post-p

@bgulla
bgulla / rke2_kubevip.md
Last active January 20, 2025 05:57
RKE2 api-server HA with Kube-VIP

On-Prem RKE2 api-server HA with Kube-VIP

               ,        ,  _______________________________
   ,-----------|'------'|  |                             |
  /.           '-'    |-'  |_____________________________|
 |/|             |    |    
   |   .________.'----'    _______________________________
   |  ||        |  ||      |                             |
   \__|'        \__|'      |_____________________________|
@superseb
superseb / minio-nginx-selfsigned.sh
Last active July 3, 2025 07:31
Minio + NGINX in Docker using self signed certificates
#!/bin/bash
if [ "$#" -lt 0 ]; then
echo "Usage: $0"
exit 1
fi
echo "Generating nip.io based on found external IP"
FOUNDIP=$(docker run --rm --net=host appropriate/curl https://api.ipify.org)
APIFQDN="minio-api.${FOUNDIP}.nip.io"
FQDN="minio.${FOUNDIP}.nip.io"