Public
Kubernetesk3sKyvernoFalcoProxmoxTerraformGoRBACMITRE ATT&CK

Kubernetes Security Homelab

A security-first k3s cluster built from scratch on bare-metal Proxmox — starting deliberately broken, hardened systematically, with every decision documented. Built to close a hands-on Kubernetes security gap and produce a public artifact demonstrating how I approach security engineering when there's no ticket, no deadline, and no one telling me what to build.

View Source ↗

The Problem

Kubernetes security experience is easy to claim and hard to verify. Coursework covers the concepts. Cloud-managed clusters abstract the controls. What's missing is evidence of someone who actually configured RBAC from scratch, wrote admission policies, built detection rules, and documented why each decision was made — not just what was done.

Approach

The project runs in three phases, visible in git history via annotated tags.

Architecture

Type-1 hypervisor + LXCs (illustrative — not a live network map)
├── cp-node / LXC          control plane
├── worker-a / LXC         data + OpenSearch, CTI workloads
├── worker-b / LXC         dashboards, app workloads
├── gpu-adjunct / LXC      privileged inference host (when used)
└── falco-host / LXC       kernel-level telemetry (privileged)

k3s namespaces (all default-deny)
├── security-project  ← falco-ingestor, cti-agent
├── opensearch        ← SIEM + CMDB
├── llm-gateway       ← LiteLLM, sanitizer, TOON, OOB inspector
├── ai-inference      ← Ollama (KEDA scale-to-zero)
└── homework          ← OpenWebUI, restricted access

Key Design Decisions

Hardening Controls

ControlImplementationWhat It Closes
RBACDedicated SA per workload, explicit verb lists, no wildcardsLateral movement via over-provisioned tokens
Pod Security Standardsenforce: restricted on all namespacesPod-level misconfigs at admission
Network PoliciesDefault deny all, explicit allows per serviceUnrestricted pod-to-pod lateral movement
Kyverno7 policies: block privileged, block :latest, require limits, restrict hostPath, restrict capabilitiesAdmission-time policy enforcement
SecretsVault K8s auth, External Secrets Operator injectionPlaintext credentials in manifests
Image pinningDigest references, not tagsUnpinned, unreproducible builds
Resource limitsRequests and limits on every containerResource exhaustion, noisy neighbor

Direction

The hardened cluster is the foundation for the rest of the homelab stack — Falco detection engineering, a CTI agent pipeline, and an LLM safety platform built on top. Each layer is a separate project with its own documentation and git history, all rooted in this cluster.

← All Development