Cluster Overview

MEGATRON runs a K3s Kubernetes cluster -- a lightweight, production-ready distribution of Kubernetes designed for resource-constrained and edge environments.

Cluster Summary

PropertyValue
DistributionK3s
Versionv1.33.6+k3s1
Nodes3
Control Planemegatron (single master)
Workersthing1, thing2
Namespaces31
Pods100+
Ingress ControllerTraefik
Storage BackendLonghorn
Service MeshLinkerd
Container Runtimecontainerd

Architecture

                    ┌─────────────────────────────────────────────┐
                    │              K3s Cluster                    │
                    │                                             │
  Internet ───>     │  ┌─────────────────────────────┐           │
  Cloudflare ───>   │  │     megatron (control-plane) │           │
  cloudflared ───>  │  │     ─────────────────────────│           │
                    │  │  K3s Server (API, scheduler,  │           │
  :32672 ──────>    │  │    controller-manager, etcd)  │           │
  Traefik           │  │  Traefik Ingress Controller   │           │
                    │  │  cert-manager                 │           │
                    │  │  GPU Operator (2x RTX 3090)   │           │
                    │  │  Longhorn Manager              │           │
                    │  │  Application Pods              │           │
                    │  │  Age: 88 days                  │           │
                    │  └─────────────────────────────┘           │
                    │                                             │
                    │  ┌──────────────────┐  ┌──────────────────┐│
                    │  │  thing1 (worker)  │  │  thing2 (worker)  ││
                    │  │  ────────────────  │  │  ────────────────  ││
                    │  │  K3s Agent        │  │  K3s Agent        ││
                    │  │  Application Pods │  │  Application Pods ││
                    │  │  Longhorn Replica │  │  Longhorn Replica ││
                    │  │  Age: 11 hours    │  │  Age: 11 hours    ││
                    │  └──────────────────┘  └──────────────────┘│
                    └─────────────────────────────────────────────┘

Traffic Flow

Internet
    │
    v
Cloudflare DNS + WAF
    │
    v
cloudflared (tunnel 6d8885c4-...)
    │
    v
https://localhost:32672 (noTLSVerify)
    │
    v
Traefik Ingress Controller (kube-system)
    │
    ├──> IngressRoute (hostname-based routing)
    │        │
    │        ├──> stiq.us ──────────> stiq namespace pods
    │        ├──> glamhub.m3gatr0n ─> glamhub namespace pods
    │        ├──> corestation.io ───> corestation namespace pods
    │        ├──> idp.pro ──────────> idp namespace pods
    │        ├──> kelsey... ────────> kelsey namespace pods
    │        ├──> aegis.m3gatr0n ──> aegis namespace pods
    │        ├──> auth.m3gatr0n ───> authentik namespace pods
    │        ├──> registry.m3gatr0n > registry namespace pods
    │        ├──> grafana.m3gatr0n ─> monitoring namespace pods
    │        └──> platform.m3gatr0n > devtroncd namespace pods
    │
    v
Linkerd Service Mesh (mTLS between pods)

Key Components

Ingress: Traefik

Traefik runs as the default K3s ingress controller in kube-system. It terminates TLS (via cert-manager certificates) and routes traffic to backend services based on hostname matching. All external traffic arrives through the Cloudflare tunnel on NodePort 32672.

Storage: Longhorn

Longhorn provides distributed block storage with replication across nodes. It manages persistent volumes for stateful workloads like databases, registries, and secret stores.

Mesh: Linkerd

Linkerd provides mutual TLS between pods, traffic splitting, and observability. Recently deployed (11 hours old at audit time).

Certificates: cert-manager

cert-manager automates TLS certificate provisioning via Let's Encrypt. Currently configured with HTTP-01 challenge, which is broken behind the Cloudflare tunnel. Migration to DNS-01 is required. See TLS Certificates.

GPU: NVIDIA GPU Operator

The GPU Operator in the gpu-operator namespace manages NVIDIA drivers, container toolkit, and device plugin for GPU-accelerated pods.

Quick Commands

# Cluster status
kubectl get nodes -o wide

# All pods across all namespaces
kubectl get pods -A

# Namespace list with pod counts
kubectl get ns

# Cluster info
kubectl cluster-info

# K3s specific
k3s kubectl get nodes
systemctl status k3s