Back to Homepage Back to Top

KUBERNETES PLATFORM ENGINEERING LAB

A production-inspired Kubernetes platform built on Proxmox with Infrastructure as Code, configuration management, GitOps, observability, and automated validation.

Proxmox Terraform Ansible Kubernetes Cilium Argo CD Prometheus

Project Overview

This project is a hands-on Platform Engineering laboratory for designing, automating, operating, and validating a highly available Kubernetes platform on Proxmox.

Infrastructure is provisioned with Terraform, system and Kubernetes configuration is automated with Ansible, while Cilium, Helm, Argo CD, Prometheus, Grafana, and NFS provide networking, application delivery, observability, and storage.

3

Control Planes

2

Worker Nodes

2

Load Balancers

1

HA Kubernetes Cluster

Architecture

The platform consists of a Proxmox virtualization layer, highly available load balancing, three Kubernetes control planes, two worker nodes, Cilium networking, and persistent storage through NFS.

Proxmox VE Virtualization Platform
Infrastructure as Code
Terraform VM Provisioning
Ansible Configuration Management
Kubernetes Infrastructure
HAProxy + Keepalived Highly Available API Endpoint LB01 · 192.168.1.25 LB02 · 192.168.1.26
Kubernetes API
CP01 192.168.1.20 Control Plane
CP02 192.168.1.23 Control Plane
CP03 192.168.1.24 Control Plane
Kubernetes Cluster
Worker01 192.168.1.21 Application Workloads
Worker02 192.168.1.22 Application Workloads
Cilium Networking
Cilium Container Networking Pod & Service Connectivity
Argo CD GitOps Declarative Application Delivery
NFS CSI Persistent Storage PV / PVC
Monitoring Prometheus + Grafana Alertmanager

Infrastructure as Code

The Kubernetes environment starts at the infrastructure layer. Proxmox virtual machines are provisioned declaratively using Terraform and a reusable VM module.

Terraform

Terraform manages the lifecycle of the Proxmox virtual machines used by the Kubernetes platform.

  • Reusable Proxmox VM module
  • Ubuntu 24.04 VM template
  • Declarative VM configuration
  • Static network configuration
  • Cloud-init integration
  • QEMU guest agent

Infrastructure Result

Role Nodes
Control Plane 3
Worker 2
Load Balancer 2
Total 7 VMs

Configuration Management

Ansible is used to transform the provisioned virtual machines into a functional Kubernetes platform.

k8s_common k8s_control_plane k8s_control_plane_join load_balancer helm cilium

The automation covers operating-system preparation, Kubernetes prerequisites, control-plane initialization, control-plane joining, load balancing, Helm, and Cilium.

High Availability Kubernetes

The cluster uses three control-plane nodes behind a highly available load-balancing layer.

Control Plane

Three control-plane nodes provide redundancy for the Kubernetes control-plane layer.

Load Balancing

HAProxy provides the API load-balancing layer while Keepalived provides high availability for the endpoint.

Bootstrap

Kubernetes was bootstrapped using kubeadm and the control-plane nodes were joined into the HA cluster.

Kubernetes version: v1.34.10

Container runtime: containerd 2.2.1

Operating system: Ubuntu 24.04.4 LTS

Container Networking with Cilium

Cilium provides the networking layer for the Kubernetes cluster and was validated through actual workload and service connectivity tests.

Cilium

  • Kubernetes CNI
  • Pod networking
  • Service networking
  • ClusterIP connectivity
  • Network observability foundation

Validation

  • Cilium pod health
  • Pod-to-pod communication
  • ClusterIP service testing
  • NGINX workload connectivity
  • Cross-node communication

Persistent Storage

Persistent storage is provided through NFS and integrated into Kubernetes using the NFS CSI driver.

Application
↓
PersistentVolumeClaim
↓
StorageClass
↓
NFS CSI Driver
↓
NFS Server

Validation

  • CSI driver deployment
  • StorageClass validation
  • PV/PVC provisioning
  • Volume binding
  • Persistent read/write testing

GitOps with Argo CD

Argo CD provides the GitOps layer for declarative application delivery into the Kubernetes environment.

Git Repository
↓
Argo CD
↓
Kubernetes

Validated Applications

dev-nginx dev-monitoring

Applications were validated through Argo CD synchronization and health status.

Observability

The monitoring stack provides visibility into Kubernetes workloads, nodes, and control-plane components.

Prometheus Alertmanager Grafana Prometheus Operator node-exporter

Validation

  • Prometheus readiness endpoint
  • Kubernetes node metrics
  • Kubelet metrics
  • ServiceMonitor discovery
  • Prometheus target health

Readiness check:

curl -s http://localhost:9091/-/ready

Expected result: Prometheus Server is Ready.

Operational Troubleshooting

Problem

Prometheus reported Kubernetes control-plane metrics targets as unavailable.

Investigation

The monitoring path was traced from Prometheus targets through ServiceMonitors and Kubernetes endpoints to the underlying control-plane component configuration.

Prometheus → ServiceMonitor → Endpoint → Kubernetes Component → Listener

Root Cause

The affected metrics endpoint was bound to 127.0.0.1, preventing Prometheus from reaching it through the expected network path.

Resolution

The listener configuration was changed to accept connections through the node network interface. The affected component was restarted and the endpoint was tested directly.

Validation

  • Listener checked with ss
  • Endpoint tested with curl
  • Kubernetes resources verified with kubectl
  • Prometheus targets rechecked

Failure Testing

The platform was tested under controlled failure scenarios to validate behavior beyond the normal healthy state.

Worker Node Failure

A worker node was made unavailable and the resulting cluster behavior and workload recovery were observed.

Control Plane Failure

Control-plane nodes were tested individually to validate the behavior of the highly available Kubernetes control plane.

Automation Idempotency

Ansible automation was repeatedly executed against an already-configured Kubernetes environment.

Desired State
↓
Ansible
↓
Existing Environment
↓
Converged State

Validation Approach

  • Repeated playbook execution
  • Ansible check mode
  • Investigation of unexpected changes
  • Verification of already-correct configuration

The goal was to ensure that automation behaves as repeatable configuration management rather than a one-time installation script.

Technology Stack

Terraform Ansible Kubernetes Cilium HAProxy Keepalived Helm NFS CSI Argo CD Prometheus Grafana

Engineering Focus

Infrastructure Automation

Proxmox virtual machines are provisioned declaratively using Terraform and reusable infrastructure modules.

Configuration Management

Ansible automates operating-system preparation, Kubernetes configuration, Helm, networking, and platform components.

High Availability

Three control-plane nodes are exposed through a highly available HAProxy and Keepalived layer.

Observability

Prometheus, Alertmanager, Grafana, and Kubernetes metrics provide visibility into cluster health.

Testing & Validation

  • Infrastructure validation
  • Kubernetes node and workload validation
  • Cilium networking validation
  • ClusterIP service testing
  • NFS persistent storage testing
  • Worker-node failure testing
  • Control-plane failure testing
  • Prometheus readiness and metrics validation
  • Ansible repeated execution and idempotency testing

Troubleshooting

The platform was also used to investigate real operational issues rather than only validating successful deployments.

One monitoring issue involved Kubernetes control-plane metrics being unreachable by Prometheus. The investigation traced the problem from Prometheus targets through ServiceMonitors and endpoints to the component listener configuration.

The root cause was a metrics endpoint bound to 127.0.0.1. The configuration was corrected, connectivity was validated, and Prometheus targets were rechecked.

Ansible Idempotency

Ansible automation was repeatedly executed against the existing environment to verify that the declared state converges without unnecessary changes.

Check mode and repeated execution were used as part of the validation process. Unexpected changes were investigated rather than automatically considered acceptable.

View Source Code