Inception-of-Things
42 Abu Dhabi

Inception-of-Things

Kubernetes & GitOps Infrastructure

3 weeks
Individual Project
KubernetesK3s & K3dArgo CDVagrantTraefik IngressBash Scripting

Inception-of-Things bridges low-level virtualization with modern cloud-native Kubernetes orchestration. The project spans three distinct architectural phases: automating a multi-node K3s cluster over isolated private networks with Vagrant, orchestrating host-based ingress traffic routing across multiple replicated web microservices, and implementing enterprise GitOps continuous delivery with K3d and Argo CD to synchronize declarative manifests seamlessly from Git repositories.

Key Features

Multi-Node K3s Cluster

Automated provisioning of controller (nmunirS) and worker (nmunirSW) nodes with automated token handshakes and private host-only networking.

Host-Based Ingress Routing

Traefik Ingress Controller configured with host-based rules routing traffic dynamically between multiple web applications and replica sets.

Automated GitOps with Argo CD

Continuous synchronization of declarative Kubernetes manifests with automated pruning and self-healing to eliminate configuration drift.

Hermetic Evaluation Defense

Zero manual intervention setup scripts designed for bulletproof verification and idempotent teardown/rebuild cycles.

Development Journey

Part 1

Multi-Node K3s Infrastructure

Designed multi-machine Vagrant infrastructure deploying K3s in server and agent modes across isolated static IP subnets (192.168.56.0/24), sharing discovery join tokens securely.

Part 2

Microservice Ingress & Scaled Replicas

Deployed 3 distinct microservices in K3s, managing horizontal pod replication (3 replicas on app2) and routing via Host headers through a Traefik Ingress resource.

Part 3

K3d & Enterprise GitOps Continuous Delivery

Containerized Kubernetes clustering with K3d, establishing Argo CD within dedicated namespaces to track remote Git repository changes and deploy to dev namespaces automatically.

Challenges & Solutions

Inter-VM Token Synchronization

Problem:

In Part 1, the worker VM required the master node's dynamic join token before its K3s agent service could connect, risking race conditions upon simultaneous boot.

Solution:

Engineered provisioning scripts utilizing Vagrant synced folders with polling barriers to ensure the worker waits for token publication before starting the agent daemon.

Deterministic Host Ingress Routing

Problem:

Ensuring host-header based routing functioned reliably across all virtual domains while handling unmatched requests gracefully.

Solution:

Configured Traefik Ingress rules with exact host-header matching for app1.com and app2.com while directing default fallback requests to app3.

GitOps Configuration Drift & Self-Healing

Problem:

Preventing manual interventions from breaking the desired state defined in version control.

Solution:

Enabled Argo CD's automated self-heal and prune policies, forcing Kubernetes to immediately reconcile any manual cluster edits back to the source Git repository state.

p3/confs/application.yaml
yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: iot-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: 'https://github.com/NomanMunir/iot-nmunir.git'
    targetRevision: HEAD
    path: .
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: dev
  syncPolicy:
    automated:
      prune: true
      selfHeal: true