Client project for Hamdiservices
RKE2 automated deployment platform
Infrastructure as code that deploys a production-ready, highly available RKE2 cluster on Proxmox in about 27 minutes. The whole toolkit runs in one Docker container, so every deployment is reproducible in any environment.
Project
Client project for Hamdiservices
Focus areas
DevOps, infrastructure as code
Technologies
Overview
Provisioning Kubernetes clusters by hand is error-prone and hard to repeat. This platform automates every step, from VM creation to a complete observability stack.
It is built for DevOps engineers, platform teams and organisations that want to standardise how they provision Kubernetes. One docker run and one make deploy are all it takes.
Implementation
- Run the containerThe deployment image (elmehdi74/rke2-automated:v2.3) bundles Terraform v1.14.2, Ansible v10.7.0, kubectl and Helm v3. It starts with Proxmox credentials and SSH keys mounted.
- Template in 2 to 3 minutesA script downloads the official Ubuntu cloud image and builds a VM template with cloud-init. This replaced Packer and is 5 to 10 times faster, with zero interaction.
- VMs with TerraformTerraform provisions 7 VMs through the Proxmox API: a DHCP server, an HAProxy load balancer, 3 control plane nodes and 2 workers.
- RKE2 cluster with AnsibleAnsible configures RKE2 v1.30.7 in HA mode with etcd on three control planes and Cilium as the eBPF-based CNI.
- Platform componentsLonghorn for distributed storage with 2 replicas, Traefik as ingress, HAProxy for the API server and Rancher as the management UI.
- ObservabilityPrometheus, Grafana and Alertmanager for metrics; Elasticsearch, Logstash and Kibana for central logging. Every stateful component runs on Longhorn.
Screenshots and diagrams
All 7 VMs in Proxmox · Deployment image versions
Virtual machines
| VM | Hostname | Role | CPU / RAM | Disk |
|---|---|---|---|---|
| 110 | infra-lb | DHCP server | 2 / 2 GB | 20 GB |
| 100 | infra-net | HAProxy LB | 2 / 2 GB | 20 GB |
| 120 to 122 | rke2-cp-1 to 3 | Control plane | 4 / 8 GB | 50 GB |
| 130 to 131 | rke2-worker-1 to 2 | Worker | 4 / 16 GB | 100 GB |
Technical decision: cloud-init instead of Packer
| Aspect | Packer (retired) | cloud-init (current) |
|---|---|---|
| Build time | 15 to 30 minutes | 2 to 3 minutes |
| Runs inside Docker | No (VNC issues) | Yes |
| Automation | Complex (ISO boot) | Simple (API) |
| User interaction | Required | None |
Quick start
docker pull elmehdi74/rke2-automated:v2.3
docker run -it --rm --network host \
-e PROXMOX_API_TOKEN_SECRET="your-token" \
-e PROXMOX_HOST="your-proxmox-ip" \
-v ~/.ssh:/root/.ssh:ro \
elmehdi74/rke2-automated:v2.3
make deployPrerequisites: Proxmox VE 7 or 8 with an API token, Docker, an SSH key pair and at least 64 GB RAM and 400 GB storage on the host.
Results
- One-command deployment: docker run and make deploy
- Production-ready 7-node cluster with 3 control planes and 2 workers
- Complete observability with Prometheus, Grafana, ELK and Alertmanager
- Distributed storage with Longhorn and 2 replicas per volume
- Multi-arch support for AMD64 and ARM64
- No secrets inside the container image
Client feedback
“I had the pleasure of working with Elmehdi on our infrastructure modernization project for us over four months. He is an incredibly skilled professional who brought deep Kubernetes and automation expertise to our team. I was particularly impressed by his ability to build a complete production-grade Kubernetes platform that reduced our deployment time.


Planning something similar?
I support teams across the DACH region and French-speaking countries, remotely or on-site around Stuttgart.