Repository navigation
Packer
RaΓΊl Tapara Y. edited this page Sep 3, 2025
·
1 revision
This project contains a Packer template to build custom images for Proxmox VE. Itβs ideal for automating the creation of base images like Ubuntu Server with pre-installed configurations (such as kubeadm, etc.).
- Proxmox VE with API access
- Packer β₯ 1.8
- API token with permission to create VMs
packer init -upgrade .packer validate -var-file=dev.pkrvars.hcl .packer build -on-error=ask -var-file="dev.pkrvars.hcl" .PACKER_LOG=1 packer build -on-error=ask -var-file="dev.pkrvars.hcl" . 2>&1 | tee logs/packer-build-$(date +"%Y-%m-%d_%H:%M:%S").logpacker
βββ base-images
β βββ files
β β βββ 99-pve.cfg # PVE configuration file
β βββ http
β β βββ meta-data # cloud-init metadata
β β βββ user-data # cloud-init user data
β βββ logs
β β βββ packer-build-*.log # build logs
β βββ dev.pkrvars.hcl # development variables
β β βββ install-configure.sh # script to install kubeadm
β βββ ubuntu-server-noble.pkr.hcl # Packer template for Ubuntu Server
β βββ variables.pkr.hcl # common variables for all templates
βββ README.md
The base image is Ubuntu Server 24.04 LTS and has firewalld enabled by default.
Below is a summary of the open ports:
| Port or Range | Protocol | Function | Direction | Used by |
|---|---|---|---|---|
| 6443 | TCP | Kubernetes API | Inbound | All |
| 2379-2380 | TCP | etcd services | Inbound | kube-apiserver, etcd |
| 10250 | TCP | Kubelet API | Inbound | Self, control plane |
| 10251 | TCP | kube-scheduler | Inbound | Self |
| 10252 | TCP | kube-controller-manager | Inbound | Self |