Skip to content Skip to footer

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

RKE2Proxmox VETerraformAnsibleDockerCiliumLonghornTraefikHAProxyPrometheusGrafanaELKRancher

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

  1. 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.
  2. 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.
  3. VMs with TerraformTerraform provisions 7 VMs through the Proxmox API: a DHCP server, an HAProxy load balancer, 3 control plane nodes and 2 workers.
  4. 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.
  5. Platform componentsLonghorn for distributed storage with 2 replicas, Traefik as ingress, HAProxy for the API server and Rancher as the management UI.
  6. 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

VMHostnameRoleCPU / RAMDisk
110infra-lbDHCP server2 / 2 GB20 GB
100infra-netHAProxy LB2 / 2 GB20 GB
120 to 122rke2-cp-1 to 3Control plane4 / 8 GB50 GB
130 to 131rke2-worker-1 to 2Worker4 / 16 GB100 GB

Technical decision: cloud-init instead of Packer

AspectPacker (retired)cloud-init (current)
Build time15 to 30 minutes2 to 3 minutes
Runs inside DockerNo (VNC issues)Yes
AutomationComplex (ISO boot)Simple (API)
User interactionRequiredNone

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 deploy

Prerequisites: 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.

Ismail HamdiHamdiservices, Montréal · LinkedIn recommendation, February 2026View on LinkedIn →

Planning something similar?

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