MEGATRON Infrastructure Documentation
MEGATRON is a high-performance workstation serving as the central hub for software development, Kubernetes cluster management, machine learning research, and production SaaS hosting. Built around an AMD Threadripper 3990X with dual RTX 3090 GPUs and 251 GiB of RAM, it runs a K3s Kubernetes cluster spanning three nodes and hosts over a dozen production applications.
Quick Stats
| Metric | Value |
|---|---|
| CPU | AMD Threadripper 3990X (64C/128T) |
| RAM | 251 GiB (42 GiB used) |
| GPUs | 2x NVIDIA RTX 3090 (24 GB each) |
| OS | Ubuntu 20.04.6 LTS, Kernel 5.15.0-139-generic |
| Uptime | 37 days |
| K8s | K3s v1.33.6+k3s1, 3 nodes |
| Namespaces | 31 |
| Applications | 7+ production apps across 5 domains |
| Research Projects | 130+ (ULTRATHINK SNN research) |
| Root Disk | 1.6T / 3.1T (54%) |
| Network Storage | 79T / 88T SMB share (90%) |
What Runs on MEGATRON
Production Applications
- STIQ (stiq.us) -- SaaS platform with prod/dev/staging environments
- GlamHub (glamhub.m3gatr0n.com) -- Content platform with Astro, Directus, Umami analytics
- CoreStation (corestation.io) -- Fire department SaaS with 3 environments
- IDP (idp.pro) -- Identity provider platform
- Kelsey Farm Equipment (kelseyfarmequipment.com) -- E-commerce
- Aegis VPN (aegis.m3gatr0n.com) -- VPN service
- Bibliotheca -- Docker-based book management with TTS and search
Infrastructure Services
Authentik (SSO), Vault (secrets), Harbor (container registry), Devtron (CI/CD), Prometheus/Grafana/Loki (monitoring), Longhorn (distributed storage), Linkerd (service mesh), cert-manager (TLS), and more.
Research
The ULTRATHINK project -- 130+ spiking neural network and efficient attention research papers organized across 8 waves, with dedicated Claude Code agents per project.
Architecture at a Glance
Internet
|
v
Cloudflare (DNS + WAF)
|
v
cloudflared tunnel ──> Traefik Ingress (NodePort :32672)
|
┌───────┼───────┐
v v v
K3s Pods K3s Pods K3s Pods
(megatron) (thing1) (thing2)
|
v
Docker Containers (Bibliotheca, Coolify)
GPU Workloads (ULTRATHINK research)
Tailscale Mesh (Mac Studio, MacBook, Lambda)
Documentation Sections
| Section | Description |
|---|---|
| System | Hardware specs, OS, storage, GPUs |
| Cluster | K3s architecture, nodes, namespaces |
| Applications | All hosted applications with details |
| Infrastructure | Supporting services (auth, monitoring, CI/CD) |
| Docker | Non-Kubernetes containers |
| Networking | Cloudflare tunnels, Tailscale, TLS |
| IaC | Terraform, Helm, Kustomize, Compose |
| SSH & Access | SSH config, rescue SSH, kubeconfig |
| Research | ULTRATHINK project overview |
| Issues | Known problems and degraded services |
| Runbooks | Operational procedures |
Audit Date
This documentation was generated from a comprehensive system audit performed on 2026-03-24. Resource usage figures (RAM, disk, GPU) reflect point-in-time snapshots and will drift over time.
Hardware
MEGATRON is a workstation-class server built for parallel compute workloads -- deep learning training, Kubernetes orchestration, and multi-tenant application hosting.
CPU
| Property | Value |
|---|---|
| Model | AMD Ryzen Threadripper 3990X |
| Architecture | Zen 2 (Castle Peak) |
| Cores / Threads | 64 / 128 |
| Base Clock | 2.9 GHz |
| Boost Clock | 4.3 GHz |
| L3 Cache | 256 MB |
| TDP | 280W |
| Socket | sTRX4 |
Memory
| Property | Value |
|---|---|
| Total | 251 GiB |
| Used | ~42 GiB |
| Available | ~206 GiB |
| Swap Total | 31 GiB |
| Swap Used | 21 GiB |
Note: 21 GiB of swap in use despite 206 GiB available RAM suggests processes were swapped out over the 37-day uptime and not yet paged back in. Consider a targeted
swapoff -a && swapon -acycle during a maintenance window if swap pressure becomes a concern.
GPUs
| Property | GPU 0 | GPU 1 |
|---|---|---|
| Model | NVIDIA GeForce RTX 3090 | NVIDIA GeForce RTX 3090 |
| VRAM | 24 GB GDDR6X | 24 GB GDDR6X |
| VRAM Used | 2.7 GB | 14 MB |
| Temperature | 53C | 46C |
| Power Draw | 29W / 350W | 17W / 350W |
| CUDA Cores | 10,496 | 10,496 |
| Architecture | Ampere (GA102) | Ampere (GA102) |
See GPUs for detailed GPU information including driver version and active processes.
System Load
| Metric | Value |
|---|---|
| 1-min load | 20.07 |
| 5-min load | 18.45 |
| 15-min load | 17.86 |
| Uptime | 37 days |
With 128 logical threads, a load average of ~20 represents approximately 16% CPU utilization. The steady load across all three windows indicates consistent background workload, likely from K3s cluster operations and running pods.
Resource Usage Summary
CPU: [####................] ~16% (load 20 / 128 threads)
RAM: [###.................] ~17% (42 / 251 GiB)
SWAP: [##############......] ~68% (21 / 31 GiB)
GPU0: [##..................] ~11% VRAM (2.7 / 24 GB)
GPU1: [....................] ~0% VRAM (14 MB / 24 GB)
ROOT: [###########.........] 54% (1.6T / 3.1T)
SMB: [##################..] 90% (79T / 88T)
Top Processes by Resource Usage
At the time of audit, the primary consumers are:
- K3s server and agent processes -- Kubernetes control plane and kubelet
- containerd -- Container runtime for all K3s pods
- cloudflared -- Cloudflare tunnel daemon
- AlertManager -- At 203% CPU (known issue, see Current Issues)
- VNC server -- In restart loop consuming resources (known issue)
Peripheral Notes
- Storage: NVMe primary (3.1T), SMB network share (88T), NFS mounts (currently down)
- Network: Dual-stack networking with Cloudflare tunnel, Tailscale mesh, and direct SSH
- The system runs in a DEGRADED systemd state due to failed
motd-newsandwol-enableservices (non-critical)
OS & Kernel
Operating System
| Property | Value |
|---|---|
| Distribution | Ubuntu 20.04.6 LTS (Focal Fossa) |
| Kernel | 5.15.0-139-generic |
| Architecture | x86_64 |
| Uptime | 37 days |
| System State | DEGRADED |
Kernel Details
The system runs kernel 5.15, the HWE (Hardware Enablement) kernel for Ubuntu 20.04. This is a long-term support kernel with backported hardware support.
$ uname -a
Linux megatron 5.15.0-139-generic #149~20.04.1-Ubuntu SMP x86_64 GNU/Linux
Key kernel features in use:
- cgroups v2 -- Used by K3s for container resource isolation
- NVIDIA kernel modules -- GPU passthrough to containers and bare-metal workloads
- NVMe support -- Primary storage driver
- CIFS/SMB -- Network filesystem for the 88T share
- NFS -- Network filesystem (currently degraded, host unreachable)
- WireGuard -- Used by Tailscale for mesh networking
Uptime & Load
| Metric | Value |
|---|---|
| Uptime | 37 days |
| Load (1m / 5m / 15m) | 20.07 / 18.45 / 17.86 |
The load averages are stable across all three windows, indicating a consistent baseline workload. With 128 logical threads, this represents roughly 16% sustained utilization.
Systemd Service Summary
The system is in a DEGRADED state due to failed non-critical services.
Failed Services
| Service | Status | Impact |
|---|---|---|
motd-news.service | Failed | None -- message of the day fetching |
wol-enable.service | Failed | None -- Wake-on-LAN setup |
Key Running Services
| Service | Description |
|---|---|
k3s.service | K3s Kubernetes server (control plane) |
sshd.service | OpenSSH server (port 22) |
sshd-rescue.service | Rescue SSH daemon (port 2222, high priority) |
cloudflared.service | Cloudflare tunnel daemon |
tailscaled.service | Tailscale VPN daemon |
docker.service | Docker daemon for non-K3s containers |
containerd.service | Container runtime (K3s) |
nvidia-persistenced.service | NVIDIA GPU persistence daemon |
smbd.service | Samba file sharing |
ufw.service | Uncomplicated Firewall |
Service Counts (Approximate)
| State | Count |
|---|---|
| Running | 150+ |
| Exited (one-shot, OK) | 80+ |
| Failed | 2 |
| Total loaded | 300+ |
Timezone & Locale
| Property | Value |
|---|---|
| Timezone | US Eastern (EST/EDT) |
| Locale | en_US.UTF-8 |
Notable Configuration
- Rescue SSH runs on port 2222 with Nice -20 priority and OOM protection, ensuring emergency access even under extreme load. See Rescue SSH.
- Forgejo SSH runs on port 2223 for Git operations.
- The system has been running for 37 days without reboot, accumulating 21 GiB of swap usage despite ample free RAM.
Upgrade Considerations
Ubuntu 20.04 LTS reaches end of standard support in April 2025 (extended security maintenance available through 2030). Consider planning an upgrade to Ubuntu 22.04 LTS or 24.04 LTS during a maintenance window.
Storage
Disk Layout
Local Storage
| Mount | Device | Size | Used | Avail | Use% | Filesystem |
|---|---|---|---|---|---|---|
/ (root) | nvme0n1p5 | 3.1T | 1.6T | 1.4T | 54% | ext4 |
The root filesystem is on an NVMe drive providing high-speed I/O for the OS, K3s cluster data, Docker images, and research workloads.
Network Storage
| Mount | Source | Size | Used | Avail | Use% | Type | Status |
|---|---|---|---|---|---|---|---|
| SMB share | //10.0.0.41/Main | 88T | 79T | ~8.2T | 90% | CIFS | OK |
| /mnt/cloudy | NFS host | - | - | - | - | NFS | DOWN |
| /mnt/cloudy-rw | NFS host | - | - | - | - | NFS | DOWN |
Warning: The SMB share is at 90% capacity (79T/88T). Only ~8.2T remains. Monitor closely and plan cleanup or expansion. See Current Issues.
Warning: NFS mounts to
/mnt/cloudyand/mnt/cloudy-rware unreachable -- the NFS host is down.
Storage Architecture
┌──────────────────────────────────────────────────────┐
│ MEGATRON │
│ │
│ ┌─────────────────────────┐ ┌───────────────────┐ │
│ │ NVMe (nvme0n1p5) │ │ Longhorn PVs │ │
│ │ 3.1T root filesystem │ │ Distributed K3s │ │
│ │ ├── / │ │ storage across │ │
│ │ ├── /home/lucas/ │ │ megatron, thing1, │ │
│ │ │ ├── Papers/ 234GB │ │ thing2 │ │
│ │ │ ├── juke/ 60GB │ └───────────────────┘ │
│ │ │ └── miniconda3/44GB│ │
│ │ ├── /var/lib/rancher/ │ ┌───────────────────┐ │
│ │ │ (K3s data) │ │ SMB //10.0.0.41 │ │
│ │ └── /var/lib/docker/ │ │ 88T NAS share │ │
│ └─────────────────────────┘ │ 90% full │ │
│ └───────────────────┘ │
│ ┌─────────────────────────┐ │
│ │ NFS (DOWN) │ │
│ │ /mnt/cloudy │ │
│ │ /mnt/cloudy-rw │ │
│ │ Host unreachable │ │
│ └─────────────────────────┘ │
└──────────────────────────────────────────────────────┘
Top Directories by Size
| Directory | Size | Description |
|---|---|---|
~/Papers/ | 234 GB | ULTRATHINK research projects (130+ papers) |
~/juke/ | 60 GB | Media/music collection |
~/miniconda3/ | 44 GB | Conda environments and packages |
Shared Storage Layout (Research)
The ULTRATHINK research projects use a shared storage structure:
/mnt/shared/
├── datasets/ # Shared datasets (ImageNet, CIFAR, etc.)
├── checkpoints/ # Model checkpoints per project
├── pretrained/ # Pretrained models (TORCH_HOME)
├── logs/ # TensorBoard, MLflow logs
└── results/ # Experiment results
Environment variables for each project:
export {PROJECT}_DATA=/mnt/shared/datasets
export {PROJECT}_CHECKPOINTS=/mnt/shared/checkpoints/{project}
export {PROJECT}_LOGS=/mnt/shared/logs/{project}
export TORCH_HOME=/mnt/shared/pretrained
Kubernetes Persistent Storage
K3s uses Longhorn as the distributed storage backend for persistent volumes. Longhorn replicates data across the three cluster nodes (megatron, thing1, thing2) for redundancy.
See Longhorn and Storage Classes for details.
Disk Usage Quick Check
# Check all mount points
df -h
# Check root filesystem usage
df -h /
# Top-level directory sizes
du -sh /home/lucas/*/ 2>/dev/null | sort -rh | head -20
# Check inode usage
df -i /
# Check NVMe health
sudo smartctl -a /dev/nvme0n1
# Check SMB share status
mount | grep cifs
Maintenance Recommendations
- SMB share at 90% -- Audit large files, archive old data, or expand the NAS
- NFS mounts down -- Investigate and restore the NFS host or remove stale mount entries from
/etc/fstab - Root disk at 54% -- Healthy but growing; monitor
~/Papers/(234 GB) and conda envs (44 GB) - Swap usage (21/31 GiB) -- Consider
swapoff -a && swapon -aduring a maintenance window to reclaim - Longhorn health -- Verify replica counts and volume health via the Longhorn UI
GPUs
MEGATRON has two NVIDIA GeForce RTX 3090 GPUs, primarily used for deep learning training (ULTRATHINK research) and inference workloads (Ollama LLM serving).
GPU Specifications
| Specification | Value |
|---|---|
| Model | NVIDIA GeForce RTX 3090 |
| Count | 2 |
| Architecture | Ampere (GA102) |
| CUDA Cores | 10,496 per GPU |
| Tensor Cores | 328 per GPU (3rd gen) |
| RT Cores | 82 per GPU (2nd gen) |
| VRAM | 24 GB GDDR6X per GPU |
| Memory Bus | 384-bit |
| Memory Bandwidth | 936.2 GB/s |
| TDP | 350W per GPU |
| Compute Capability | 8.6 |
| NVLink | Not available (consumer card) |
Current Status
| Metric | GPU 0 | GPU 1 |
|---|---|---|
| VRAM Used | 2.7 GB / 24 GB | 14 MB / 24 GB |
| VRAM Utilization | 11.3% | 0.06% |
| Temperature | 53C | 46C |
| Power Draw | 29W / 350W | 17W / 350W |
| Fan Speed | Auto | Auto |
| Performance State | P8 (idle) | P8 (idle) |
GPU 0: VRAM [##..................] 11% Temp: 53C Power: 29W / 350W
GPU 1: VRAM [....................] 0% Temp: 46C Power: 17W / 350W
GPU 0 has a 2.7 GB allocation, likely from an Ollama model loaded in VRAM or a persistent CUDA context. GPU 1 is essentially idle.
Quick Commands
# Full GPU status
nvidia-smi
# Compact CSV output
nvidia-smi --query-gpu=index,name,memory.used,memory.total,temperature.gpu,power.draw \
--format=csv
# Real-time monitoring (updates every second)
watch -n 1 nvidia-smi
# List GPU compute processes
nvidia-smi --query-compute-apps=pid,name,gpu_uuid,used_memory --format=csv
# Check driver and CUDA version
nvidia-smi | head -4
GPU Usage by Workload
| Workload | GPU(s) | Typical VRAM | Notes |
|---|---|---|---|
| ULTRATHINK Training | 0 + 1 | 20-48 GB total | Distributed training across both GPUs |
| Ollama (LLM inference) | 0 | 2-20 GB | Model-dependent; 7B ~ 4GB, 70B ~ 40GB |
| Bibliotheca TTS | 0 or 1 | 1-4 GB | GPU-accelerated text-to-speech |
| JupyterHub notebooks | Any | Variable | Interactive research |
| MLflow experiments | 0 or 1 | Variable | Tracked experiment runs |
Multi-GPU Training
For ULTRATHINK research, both GPUs can be used together:
# PyTorch DataParallel (simpler, less efficient)
CUDA_VISIBLE_DEVICES=0,1 python train.py
# PyTorch DistributedDataParallel (recommended for performance)
torchrun --nproc_per_node=2 train.py
# Use only a specific GPU
CUDA_VISIBLE_DEVICES=1 python inference.py
Kubernetes GPU Access
The cluster has a gpu-operator namespace, indicating the NVIDIA GPU Operator is deployed for Kubernetes GPU scheduling. Pods can request GPU resources:
resources:
limits:
nvidia.com/gpu: 1
The GPU Operator manages:
- NVIDIA driver lifecycle
- NVIDIA Container Toolkit
- Device plugin for Kubernetes
- GPU Feature Discovery
- DCGM Exporter (monitoring)
Thermal Notes
Both GPUs are running cool (46-53C) at near-idle power draw. Under full training load, expect:
| Condition | GPU Temp | Power Draw | System Power |
|---|---|---|---|
| Idle | 45-55C | 17-30W | ~100W GPU total |
| Single GPU training | 75-83C | 300-350W | ~350W GPU total |
| Dual GPU training | 78-85C | 300-350W each | ~700W GPU total |
Ensure adequate cooling and a sufficient PSU (recommended 1200W+ for dual 3090 under full load, accounting for the 280W TDP CPU).
Troubleshooting
# GPU not detected
lspci | grep -i nvidia
dmesg | grep -i nvidia
# Reset GPU (use with caution)
sudo nvidia-smi --gpu-reset -i 0
# Check for stuck processes
nvidia-smi --query-compute-apps=pid,name,used_memory --format=csv
kill -9 <stuck_pid>
# Verify CUDA installation
python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
Cluster Overview
MEGATRON runs a K3s Kubernetes cluster -- a lightweight, production-ready distribution of Kubernetes designed for resource-constrained and edge environments.
Cluster Summary
| Property | Value |
|---|---|
| Distribution | K3s |
| Version | v1.33.6+k3s1 |
| Nodes | 3 |
| Control Plane | megatron (single master) |
| Workers | thing1, thing2 |
| Namespaces | 31 |
| Pods | 100+ |
| Ingress Controller | Traefik |
| Storage Backend | Longhorn |
| Service Mesh | Linkerd |
| Container Runtime | containerd |
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
Nodes
The K3s cluster consists of three nodes: one control-plane/master node (megatron) and two worker nodes (thing1, thing2).
Node Summary
| Node | Role | K3s Version | Age | Status |
|---|---|---|---|---|
| megatron | control-plane, master | v1.33.6+k3s1 | 88 days | Ready |
| thing1 | worker | v1.33.6+k3s1 | 11 hours | Ready |
| thing2 | worker | v1.33.6+k3s1 | 11 hours | Ready |
Note: thing1 and thing2 were recently joined or re-joined to the cluster (11 hours old at audit time). This is significantly newer than megatron's 88-day age, suggesting the workers were recently provisioned, re-imaged, or reconnected.
Node Details
megatron (Control Plane)
| Property | Value |
|---|---|
| Role | control-plane, master |
| OS | Ubuntu 20.04.6 LTS |
| Kernel | 5.15.0-139-generic |
| CPU | AMD Threadripper 3990X (64C/128T) |
| RAM | 251 GiB |
| GPUs | 2x NVIDIA RTX 3090 (24GB each) |
| Root Disk | 3.1T NVMe |
| K3s Version | v1.33.6+k3s1 |
| Age | 88 days |
| Tailscale IP | 100.70.25.47 |
This node runs:
- K3s server (API server, scheduler, controller-manager, embedded etcd)
- Traefik ingress controller
- cert-manager
- Most application pods (as the primary node)
- GPU-accelerated workloads
- Docker daemon (for non-K3s containers)
thing1 (Worker)
| Property | Value |
|---|---|
| Role | worker |
| K3s Version | v1.33.6+k3s1 |
| Age | 11 hours |
thing2 (Worker)
| Property | Value |
|---|---|
| Role | worker |
| K3s Version | v1.33.6+k3s1 |
| Age | 11 hours |
Hardware details for thing1 and thing2 are not captured in the audit. Run
kubectl describe node thing1andkubectl describe node thing2for full specs.
Node Architecture
┌──────────────────────────────────────────────────┐
│ megatron (control-plane) │
│ AMD Threadripper 3990X | 251GB RAM | 2x 3090 │
│ ┌──────────────────────────────────────────────┐│
│ │ K3s Server: API, scheduler, etcd, controller ││
│ │ Traefik, cert-manager, Longhorn mgr ││
│ │ Application pods (stiq, glamhub, core, ...) ││
│ │ GPU workloads, Docker containers ││
│ └──────────────────────────────────────────────┘│
└──────────────────────────────────────────────────┘
│ │
v v
┌────────────────┐ ┌────────────────┐
│ thing1 (worker)│ │ thing2 (worker)│
│ K3s Agent │ │ K3s Agent │
│ App pods │ │ App pods │
│ Longhorn │ │ Longhorn │
│ replicas │ │ replicas │
└────────────────┘ └────────────────┘
Node Management
# List nodes with details
kubectl get nodes -o wide
# Describe a specific node
kubectl describe node megatron
# Check node resource usage
kubectl top nodes
# Drain a node for maintenance
kubectl drain thing1 --ignore-daemonsets --delete-emptydir-data
# Uncordon after maintenance
kubectl uncordon thing1
# Check K3s agent status on worker
ssh thing1 'systemctl status k3s-agent'
# Join a new worker node
# On the new node:
curl -sfL https://get.k3s.io | K3S_URL=https://megatron:6443 \
K3S_TOKEN=<token> sh -
Labels and Taints
To schedule GPU workloads only on megatron:
# Label GPU node
kubectl label node megatron gpu=true
# Taint non-GPU nodes
kubectl taint nodes thing1 gpu=false:NoSchedule
kubectl taint nodes thing2 gpu=false:NoSchedule
Pods requesting nvidia.com/gpu resources will automatically be scheduled on nodes with available GPUs through the NVIDIA device plugin.
Namespaces
The cluster has 31 namespaces spanning production applications, development environments, infrastructure services, and specialized workloads.
Namespace Inventory
Application Namespaces
| Namespace | Purpose | Environments | Key Services |
|---|---|---|---|
| stiq | STIQ SaaS platform (production) | prod | API, app, admin |
| stiq-dev | STIQ development | dev | API, app, admin |
| stiq-staging | STIQ staging | staging | API, app, admin |
| glamhub | GlamHub content platform (production) | prod | Astro, Directus, Umami, N8N, Ollama, Qdrant |
| glamhub-dev | GlamHub development | dev | Mirrors prod stack |
| corestation | CoreStation fire dept SaaS (production) | prod | API, app, admin |
| corestation-dev | CoreStation development | dev | API, app, admin |
| corestation-staging | CoreStation staging | staging | API, app, admin |
| idp | IDP identity platform (production) | prod | API, app |
| idp-dev | IDP development | dev | API, app |
| kelsey | Kelsey Farm Equipment (production) | prod | App, API |
| aegis | Aegis VPN (production) | prod | VPN, API |
| aegis-dev | Aegis VPN development | dev | VPN, API |
Infrastructure Namespaces
| Namespace | Purpose | Key Components |
|---|---|---|
| kube-system | Core K3s components | Traefik, CoreDNS, metrics-server |
| kube-node-lease | Node heartbeat leases | Lease objects |
| kube-public | Public cluster info | ConfigMaps |
| default | Default namespace | (should be empty) |
| authentik | SSO/OIDC provider | Authentik server, worker, Redis, PostgreSQL |
| vault | Secrets management | HashiCorp Vault |
| registry | Container registry | Harbor core, database, Redis, Trivy |
| devtroncd | CI/CD GitOps platform | Devtron, ArgoCD, PostgreSQL |
| monitoring | Observability stack | Prometheus, Grafana, Loki, AlertManager |
| cert-manager | TLS automation | cert-manager controller, webhook, cainjector |
| longhorn-system | Distributed storage | Longhorn manager, driver, UI |
| linkerd | Service mesh | Linkerd control plane, proxies |
Specialized Namespaces
| Namespace | Purpose | Key Components |
|---|---|---|
| ai-ml | ML/AI workloads | MLflow, Ollama |
| gpu-operator | GPU management | NVIDIA GPU Operator, device plugin |
| jupyterhub | Notebook server | JupyterHub, user notebook pods |
| argo | Workflow orchestration | Argo Workflows controller, server |
| openfaas | Serverless functions | OpenFaaS gateway, controller |
| data | Data services | Data processing pipelines |
| docs | Documentation | Documentation site hosting |
| sonarqube | Code quality | SonarQube server, database |
Namespace Map
K3s Cluster (31 namespaces)
│
├── System (4)
│ ├── kube-system (Traefik, CoreDNS, metrics)
│ ├── kube-node-lease (node heartbeats)
│ ├── kube-public (public config)
│ └── default (unused)
│
├── Applications (13)
│ ├── stiq / stiq-dev / stiq-staging
│ ├── glamhub / glamhub-dev
│ ├── corestation / corestation-dev / corestation-staging
│ ├── idp / idp-dev
│ ├── kelsey
│ └── aegis / aegis-dev
│
├── Infrastructure (7)
│ ├── authentik (SSO)
│ ├── vault (secrets)
│ ├── registry (Harbor)
│ ├── devtroncd (CI/CD)
│ ├── monitoring (Prometheus, Grafana, Loki)
│ ├── cert-manager (TLS certs)
│ └── longhorn-system (storage)
│
├── Platform Services (4)
│ ├── linkerd (service mesh)
│ ├── argo (workflows)
│ ├── openfaas (serverless)
│ └── sonarqube (code quality)
│
└── Specialized (3)
├── ai-ml (MLflow, Ollama)
├── gpu-operator (NVIDIA)
├── jupyterhub (notebooks)
├── data (data processing)
└── docs (documentation)
Quick Commands
# List all namespaces
kubectl get namespaces
# Pods in a specific namespace
kubectl get pods -n stiq
# All resources in a namespace
kubectl get all -n glamhub
# Resource usage by namespace
kubectl top pods -n monitoring
# Create a new namespace
kubectl create namespace my-new-ns
# Set default namespace for kubectl
kubectl config set-context --current --namespace=stiq
Multi-Environment Pattern
Most applications follow a consistent multi-environment pattern:
| Environment | Namespace Suffix | Domain Pattern | Purpose |
|---|---|---|---|
| Production | (none) | app.domain.com | Live traffic |
| Development | -dev | dev-app.domain.com | Active development |
| Staging | -staging | staging-app.domain.com | Pre-release validation |
Example for STIQ:
stiq-> stiq.us, api.stiq.us, app.stiq.us, admin.stiq.usstiq-dev-> dev.stiq.us, dev-api.stiq.us, dev-app.stiq.us, dev-admin.stiq.usstiq-staging-> staging.stiq.us, staging-api.stiq.us, staging-app.stiq.us, staging-admin.stiq.us
Pods & Services
Auto-generated: 2026-03-24 14:19:42 CDT
This page is automatically generated from live cluster state.
Nodes
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
megatron Ready control-plane,master 88d v1.33.6+k3s1 10.0.0.85 <none> Ubuntu 20.04.6 LTS 5.15.0-139-generic containerd://2.1.5-k3s1.33
thing1 Ready <none> 12h v1.33.6+k3s1 10.0.0.92 <none> Ubuntu 24.04.4 LTS 6.17.0-19-generic containerd://2.1.5-k3s1.33
thing2 Ready <none> 12h v1.33.6+k3s1 10.0.0.91 <none> Ubuntu 24.04.4 LTS 6.17.0-19-generic containerd://2.1.5-k3s1.33
Pods by Namespace
| Namespace | Pod | Ready | Status | Restarts | Age |
|---|---|---|---|---|---|
| aegis | aegis-guardian-66478678b8-shmbr | 1/1 | Running | 0 | 20d |
| aegis | aegis-sentinel-57cfc7777f-r98kq | 1/1 | Running | 0 | 20d |
| ai-ml | gpu-test-job-v2-master-0 | 0/1 | Completed | 0 | 11h |
| ai-ml | mlflow-5564b6fdf9-862hb | 2/2 | Running | 0 | 4h23m |
| ai-ml | ollama-5685d5bbbc-9s2zx | 1/1 | Running | 0 | 11h |
| ai-ml | ollama-58fbcfdfb9-n8tlf | 0/2 | Init:0/1 | 0 | 4h23m |
| argo | workflow-controller-7bc968fd7d-rxmvz | 1/1 | Running | 1 | (11h |
| argo-rollouts | argo-rollouts-79b89d8856-ghj4h | 1/1 | Running | 0 | 11h |
| authentik | authentik-server-6d49f878c7-gpk9f | 1/1 | Running | 0 | 3h40m |
| authentik | authentik-worker-6f948944cd-9r742 | 1/1 | Running | 12 | (171m |
| cert-manager | cert-manager-7ff7f97d55-7qz5w | 1/1 | Running | 24 | (37d |
| cert-manager | cert-manager-cainjector-59bb669f8d-zp6nr | 1/1 | Running | 28 | (37d |
| cert-manager | cert-manager-webhook-59bbd786df-x4zd2 | 1/1 | Running | 22 | (37d |
| cnpg-system | cnpg-cloudnative-pg-75b9dd87c8-4fxc6 | 1/1 | Running | 0 | 11h |
| corestation | hydrant-api-cf4d8446c-4zr9l | 1/1 | Running | 0 | 20d |
| corestation | hydrant-web-7b8f9cf54-9pzdx | 1/1 | Running | 0 | 20d |
| data | postgres-postgresql-0 | 1/1 | Running | 32 | (3h |
| data | redis-master-0 | 1/1 | Running | 20 | (37d |
| db-test | test-db-1 | 1/1 | Running | 0 | 11h |
| db-test | test-db-2 | 1/1 | Running | 0 | 11h |
| devtroncd | app-sync-cronjob-29568960-8hzk7 | 0/1 | Completed | 0 | 2d19h |
| devtroncd | app-sync-cronjob-29570400-jg6hr | 0/1 | Completed | 0 | 43h |
| devtroncd | app-sync-cronjob-29571840-hppzl | 0/1 | Completed | 0 | 19h |
| devtroncd | app-sync-job-qh58u-9cclv | 0/1 | Completed | 0 | 20d |
| devtroncd | argocd-dex-server-f8d4c7fcd-lc5n8 | 1/1 | Running | 0 | 20d |
| devtroncd | cm-acme-http-solver-2wvnb | 1/1 | Running | 0 | 4h22m |
| devtroncd | dashboard-5d4879d946-jbtlx | 1/1 | Running | 0 | 20d |
| devtroncd | devtron-599f6b9b54-8j499 | 1/1 | Running | 3 | (20d |
| devtroncd | devtron-nats-0 | 3/3 | Running | 0 | 20d |
| devtroncd | devtron-nats-test-request-reply | 0/1 | Completed | 0 | 20d |
| devtroncd | git-sensor-0 | 1/1 | Running | 3 | (20d |
| devtroncd | inception-84b64bcdcf-d4p7p | 1/1 | Running | 0 | 20d |
| devtroncd | kubelink-6dfbd6fd69-sx47q | 1/1 | Running | 3 | (20d |
| devtroncd | kubewatch-57bdcf77d5-fxz4z | 1/1 | Running | 5 | (20d |
| devtroncd | lens-85d7ffc74d-8lnkr | 1/1 | Running | 4 | (20d |
| devtroncd | postgresql-migrate-casbin-phmsc-svmq2 | 0/1 | Completed | 0 | 20d |
| devtroncd | postgresql-migrate-devtron-alpzi-5qz5g | 0/1 | Completed | 3 | 20d |
| devtroncd | postgresql-migrate-gitsensor-tzejb-bg6lp | 0/1 | Completed | 3 | 20d |
| devtroncd | postgresql-migrate-lens-cmdqu-v2b2r | 0/1 | Completed | 3 | 20d |
| devtroncd | postgresql-postgresql-0 | 2/2 | Running | 0 | 20d |
| dns | coredns-56bc8b7d7f-2hp4p | 1/1 | Running | 29 | (37d |
| docs | cm-acme-http-solver-jp6nn | 2/2 | Running | 0 | 5m29s |
| docs | megatron-docs-5dd4d46dbf-x6gbj | 1/2 | CrashLoopBackOff | 5 | (27s |
| docs | outline-756dc8df7f-hpqpp | 2/2 | Running | 0 | 3h55m |
| docs | outline-postgres-79b458859-hc2l5 | 2/2 | Running | 0 | 4h23m |
| docs | outline-redis-7dd594d967-j9vns | 2/2 | Running | 0 | 4h23m |
| docs | wikijs-744568f8ff-qk7vz | 2/2 | Running | 0 | 4h3m |
| glamhub | admin-app-77f7fb96b5-w7xkz | 1/1 | Running | 0 | 8d |
| glamhub | astro-site-7fbc6cc75b-blhsz | 1/1 | Running | 0 | 8d |
| glamhub | content-worker-78bcd75c65-ltvv2 | 1/1 | Running | 0 | 9d |
| glamhub | directus-64785956fc-t762j | 1/1 | Running | 0 | 8d |
| glamhub | haystack-578d4bf78f-725kk | 1/1 | Running | 0 | 8d |
| glamhub | n8n-577cd6bcbb-mckkq | 1/1 | Running | 3 | (9d |
| glamhub | ollama-668ff98868-vk74t | 1/1 | Running | 0 | 9d |
| glamhub | postgresql-978c65955-gpm2p | 1/1 | Running | 1 | (9d |
| glamhub | qdrant-584df9fd54-jcq58 | 1/1 | Running | 0 | 9d |
| glamhub | redis-6db4cffc85-dc4t6 | 1/1 | Running | 0 | 9d |
| glamhub | umami-694dc6d9b6-cnzs8 | 1/1 | Running | 0 | 9d |
| glamhub-dev | admin-app-b45b8cc9c-r7cf9 | 1/1 | Running | 0 | 8d |
| gpu-operator | gpu-feature-discovery-2hjfv | 1/1 | Running | 0 | 11h |
| gpu-operator | gpu-feature-discovery-8gsv7 | 1/1 | Running | 1 | 11h |
| gpu-operator | gpu-feature-discovery-swgjn | 1/1 | Running | 0 | 11h |
| gpu-operator | gpu-operator-55b78d68b-jtdkt | 1/1 | Running | 1 | (11h |
| gpu-operator | gpu-operator-node-feature-discovery-gc-775976dc9d-28ssc | 1/1 | Running | 0 | 11h |
| gpu-operator | gpu-operator-node-feature-discovery-master-c784d775d-szzjs | 1/1 | Running | 1 | (11h |
| gpu-operator | gpu-operator-node-feature-discovery-worker-5nw5z | 1/1 | Running | 0 | 11h |
| gpu-operator | gpu-operator-node-feature-discovery-worker-b6rf8 | 1/1 | Running | 0 | 11h |
| gpu-operator | gpu-operator-node-feature-discovery-worker-q2kt4 | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-container-toolkit-daemonset-4rmkq | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-container-toolkit-daemonset-gpkfb | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-container-toolkit-daemonset-ws5hj | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-cuda-validator-8bvmg | 0/1 | Completed | 0 | 11h |
| gpu-operator | nvidia-cuda-validator-mmvfz | 0/1 | Completed | 0 | 11h |
| gpu-operator | nvidia-cuda-validator-zh92f | 0/1 | Completed | 0 | 11h |
| gpu-operator | nvidia-dcgm-exporter-htwnf | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-dcgm-exporter-pknfk | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-dcgm-exporter-v4wpc | 1/1 | Running | 1 | 11h |
| gpu-operator | nvidia-device-plugin-daemonset-2ffk4 | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-device-plugin-daemonset-6ct4t | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-device-plugin-daemonset-mzt2l | 1/1 | Running | 1 | 11h |
| gpu-operator | nvidia-operator-validator-fzpvt | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-operator-validator-gzn28 | 1/1 | Running | 0 | 11h |
| gpu-operator | nvidia-operator-validator-j9rk4 | 1/1 | Running | 0 | 11h |
| idp | idp-core-6df97f46c9-ng527 | 1/1 | Running | 0 | 20d |
| jupyterhub | continuous-image-puller-7hwlt | 1/1 | Running | 0 | 11h |
| jupyterhub | continuous-image-puller-7rj85 | 1/1 | Running | 0 | 11h |
| jupyterhub | continuous-image-puller-c2czj | 1/1 | Running | 0 | 11h |
| jupyterhub | hub-8cdb6dbd7-5jmkn | 2/2 | Running | 0 | 4h |
| jupyterhub | proxy-58f55b8795-6pn29 | 2/2 | Running | 0 | 4h |
| kelsey | kelsey-app-5d9cd5cf7-rjxcp | 1/1 | Running | 0 | 20d |
| kube-system | metrics-server-7bfffcd44-qs96p | 1/1 | Running | 27 | (37d |
| kube-system | local-path-provisioner-869c44bfbd-pg9f8 | 1/1 | Running | 19 | (37d |
| kube-system | coredns-6d668d687-5pg47 | 1/1 | Running | 22 | (37d |
| kube-system | svclb-devtron-service-9104f337-5frsq | 1/1 | Running | 0 | 12h |
| kube-system | svclb-devtron-service-9104f337-7tptp | 0/1 | Pending | 0 | 20d |
| kube-system | svclb-devtron-service-9104f337-b8846 | 1/1 | Running | 0 | 12h |
| kube-system | svclb-traefik-07e361ea-926z4 | 2/2 | Running | 0 | 22d |
| kube-system | svclb-traefik-07e361ea-mdlzb | 0/2 | Pending | 0 | 12h |
| kube-system | svclb-traefik-07e361ea-tcjr6 | 0/2 | Pending | 0 | 12h |
| kube-system | traefik-8898b95b4-l6xbs | 1/1 | Running | 13 | (37d |
| kubeflow | training-operator-79cc5c4557-w88tc | 1/1 | Running | 0 | 11h |
| linkerd | linkerd-destination-8545fcf85-wvxc7 | 4/4 | Running | 0 | 11h |
| linkerd | linkerd-identity-c97756c79-zn29c | 2/2 | Running | 0 | 11h |
| linkerd | linkerd-proxy-injector-68f6b78f4c-t2z56 | 2/2 | Running | 0 | 11h |
| linkerd-viz | metrics-api-54cb8699c8-gqxtf | 2/2 | Running | 0 | 11h |
| linkerd-viz | prometheus-5c965f96cc-h2mn6 | 2/2 | Running | 0 | 11h |
| linkerd-viz | tap-c56c78c67-gj5wj | 2/2 | Running | 0 | 11h |
| linkerd-viz | tap-injector-76947889cc-khqj7 | 2/2 | Running | 0 | 11h |
| linkerd-viz | web-8b796c6f4-vrwvp | 2/2 | Running | 0 | 11h |
| longhorn-system | csi-attacher-5bcb65bf95-625vn | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-attacher-5bcb65bf95-7f6z7 | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-attacher-5bcb65bf95-99wdj | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-provisioner-5d498c6944-hk7nd | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-provisioner-5d498c6944-kkl52 | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-provisioner-5d498c6944-tj247 | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-resizer-6c6474c996-2hbql | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-resizer-6c6474c996-wkjsb | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-resizer-6c6474c996-xvlck | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-snapshotter-5cc5fb45d9-b4zk7 | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-snapshotter-5cc5fb45d9-g8575 | 1/1 | Running | 0 | 11h |
| longhorn-system | csi-snapshotter-5cc5fb45d9-rw2tz | 1/1 | Running | 0 | 11h |
| longhorn-system | engine-image-ei-75a03ec3-dltql | 1/1 | Running | 0 | 11h |
| longhorn-system | engine-image-ei-75a03ec3-kvntt | 1/1 | Running | 0 | 11h |
| longhorn-system | engine-image-ei-75a03ec3-w47p7 | 1/1 | Running | 0 | 11h |
| longhorn-system | instance-manager-4672022a1c82ae04132538dc7150b5ef | 1/1 | Running | 0 | 11h |
| longhorn-system | instance-manager-5c58e84d2652a90aca7a85427ea2c14d | 1/1 | Running | 0 | 11h |
| longhorn-system | instance-manager-b6a0ed5cacc882ffa2bdb4001da8f3a8 | 1/1 | Running | 0 | 11h |
| longhorn-system | longhorn-csi-plugin-6w8zl | 3/3 | Running | 0 | 11h |
| longhorn-system | longhorn-csi-plugin-dxvz9 | 3/3 | Running | 0 | 11h |
| longhorn-system | longhorn-csi-plugin-wp7bb | 3/3 | Running | 0 | 11h |
| longhorn-system | longhorn-driver-deployer-746f54969f-6txmb | 1/1 | Running | 0 | 11h |
| longhorn-system | longhorn-manager-5x79l | 2/2 | Running | 3 | (11h |
| longhorn-system | longhorn-manager-jctlg | 2/2 | Running | 5 | (11h |
| longhorn-system | longhorn-manager-kr7hz | 2/2 | Running | 1 | (11h |
| longhorn-system | longhorn-ui-5df99fc477-czls4 | 1/1 | Running | 0 | 11h |
| longhorn-system | longhorn-ui-5df99fc477-hvt5f | 1/1 | Running | 0 | 11h |
| minio | minio-5dd88fbb75-88mjg | 2/2 | Running | 0 | 4h23m |
| monitoring | alertmanager-0 | 1/1 | Running | 0 | 16m |
| monitoring | promtail-mmlcd | 1/1 | Running | 0 | 12h |
| monitoring | grafana-6c9d8cffdb-xtpnr | 1/1 | Running | 0 | 4h6m |
| monitoring | loki-5bc6cc48f5-c7b2f | 1/1 | Running | 0 | 21d |
| monitoring | prometheus-kube-state-metrics-7f6d5f59d5-jtrvq | 1/1 | Running | 32 | (36d |
| monitoring | prometheus-prometheus-node-exporter-2gb2v | 1/1 | Running | 1 | (11h |
| monitoring | prometheus-prometheus-node-exporter-4vflc | 1/1 | Running | 24 | 88d |
| monitoring | prometheus-prometheus-node-exporter-b8tfv | 1/1 | Running | 1 | (11h |
| monitoring | prometheus-prometheus-pushgateway-849f5c884c-4m447 | 1/1 | Running | 21 | (37d |
| monitoring | prometheus-server-74687fc4b4-tghql | 2/2 | Running | 39 | (37d |
| monitoring | promtail-fxrmx | 1/1 | Running | 0 | 12h |
| monitoring | cm-acme-http-solver-7f4xb | 1/1 | Running | 0 | 4h22m |
| monitoring | promtail-r9bp2 | 1/1 | Running | 0 | 21d |
| nats | nats-0 | 2/2 | Running | 0 | 11h |
| nats | nats-box-8cdff494f-7dg69 | 2/2 | Running | 0 | 4h23m |
| openfaas | alertmanager-86dfdb8477-rn76j | 1/1 | Running | 0 | 11h |
| openfaas | gateway-646b8ffb9f-dzct7 | 2/2 | Running | 1 | (11h |
| openfaas | nats-68cdf6fb98-5xsqt | 1/1 | Running | 0 | 11h |
| openfaas | prometheus-874d869b7-tqqm2 | 1/1 | Running | 0 | 11h |
| openfaas | queue-worker-7bc5c894c5-5bkb2 | 1/1 | Running | 1 | (11h |
| openfaas-fn | figlet-7479dc7678-ndvjb | 2/2 | Running | 0 | 11h |
| portal | portal-598fb95886-xztr7 | 1/1 | Running | 0 | 26m |
| registry | harbor-core-56d459f965-dvjhd | 1/1 | Running | 0 | 20d |
| registry | cm-acme-http-solver-jfzhh | 1/1 | Running | 0 | 4h22m |
| registry | harbor-database-0 | 1/1 | Running | 0 | 20d |
| registry | harbor-exporter-69db77b557-vnbkj | 1/1 | Running | 0 | 20d |
| registry | harbor-jobservice-86959d8d74-s7v5q | 1/1 | Running | 0 | 20d |
| registry | harbor-nginx-746ddb69d4-9xq79 | 1/1 | Running | 0 | 20d |
| registry | harbor-portal-65cbc8d65-qd7x6 | 1/1 | Running | 0 | 20d |
| registry | harbor-redis-0 | 1/1 | Running | 0 | 20d |
| registry | harbor-registry-7698c885d8-mp5cs | 2/2 | Running | 0 | 20d |
| registry | harbor-trivy-0 | 1/1 | Running | 0 | 20d |
| sonarqube | sonarqube-sonarqube-0 | 1/1 | Running | 0 | 11h |
| stiq | stiq-admin-64b9655df4-kd777 | 1/1 | Running | 0 | 20d |
| stiq | stiq-web-64cccf6c-nw89f | 1/1 | Running | 0 | 20d |
| stiq | stiq-marketing-d87fb986c-5ljjc | 1/1 | Running | 0 | 20d |
| stiq | stiq-api-69d456f7ff-jzfqv | 1/1 | Running | 61 | (3h |
| stiq-dev | stiq-admin-7cd6cb7b4-krzzt | 1/1 | Running | 0 | 20d |
| stiq-dev | stiq-marketing-665dc49fc8-t68b9 | 1/1 | Running | 0 | 20d |
| stiq-dev | stiq-web-5757d46b97-hzqnw | 1/1 | Running | 0 | 20d |
| stiq-dev | stiq-api-7d8dcc7dd7-ghctn | 1/1 | Running | 64 | (3h |
| stiq-staging | stiq-admin-595b55d8c7-wh9bq | 1/1 | Running | 0 | 20d |
| stiq-staging | stiq-web-64f7d7cf59-ts8dm | 1/1 | Running | 0 | 20d |
| stiq-staging | stiq-marketing-7fd69b5b48-n87gd | 1/1 | Running | 0 | 20d |
| stiq-staging | stiq-api-5864594d7c-98j22 | 1/1 | Running | 61 | (3h |
| vault | vault-0 | 2/2 | Running | 0 | 4h18m |
| vault | vault-agent-injector-5bf75dc74-lstxk | 2/2 | Running | 0 | 4h18m |
| velero | velero-5c89779b4f-t58jr | 1/1 | Running | 0 | 11h |
Services
| Namespace | Name | Type | Cluster-IP | Ports |
|---|---|---|---|---|
| aegis | aegis-guardian | ClusterIP | 10.43.115.189 | 80/TCP |
| aegis | aegis-sentinel | ClusterIP | 10.43.46.45 | 80/TCP |
| ai-ml | gpu-test-job-v2-master-0 | ClusterIP | None | 23456/TCP |
| ai-ml | mlflow | NodePort | 10.43.232.168 | 5000:30050/TCP |
| ai-ml | ollama | NodePort | 10.43.75.137 | 11434:30434/TCP |
| argo-rollouts | argo-rollouts-metrics | ClusterIP | 10.43.224.171 | 8090/TCP |
| authentik | authentik-server | ClusterIP | 10.43.82.62 | 80/TCP,443/TCP |
| cert-manager | cert-manager | ClusterIP | 10.43.144.152 | 9402/TCP |
| cert-manager | cert-manager-cainjector | ClusterIP | 10.43.85.150 | 9402/TCP |
| cert-manager | cert-manager-webhook | ClusterIP | 10.43.204.34 | 443/TCP,9402/TCP |
| cnpg-system | cnpg-webhook-service | ClusterIP | 10.43.132.22 | 443/TCP |
| corestation | hydrant-api | ClusterIP | 10.43.122.147 | 80/TCP |
| corestation | hydrant-web | ClusterIP | 10.43.191.87 | 80/TCP |
| data | postgres-postgresql | ClusterIP | 10.43.49.209 | 5432/TCP |
| data | postgres-postgresql-hl | ClusterIP | None | 5432/TCP |
| data | redis-headless | ClusterIP | None | 6379/TCP |
| data | redis-master | ClusterIP | 10.43.106.116 | 6379/TCP |
| db-test | test-db-r | ClusterIP | 10.43.28.102 | 5432/TCP |
| db-test | test-db-ro | ClusterIP | 10.43.189.72 | 5432/TCP |
| db-test | test-db-rw | ClusterIP | 10.43.188.211 | 5432/TCP |
| default | kubernetes | ClusterIP | 10.43.0.1 | 443/TCP |
| devtroncd | argocd-dex-server | ClusterIP | 10.43.202.176 | 5556/TCP,5557/TCP,5558/TCP |
| devtroncd | cm-acme-http-solver-982t8 | NodePort | 10.43.251.21 | 8089:31878/TCP |
| devtroncd | dashboard-service | ClusterIP | 10.43.67.220 | 80/TCP |
| devtroncd | devtron-nats | ClusterIP | None | 4222/TCP,6222/TCP,8222/TCP,7777/TCP,7422/TCP,7522/TCP |
| devtroncd | devtron-service | LoadBalancer | 10.43.67.59 | 80:31985/TCP |
| devtroncd | git-sensor-service | ClusterIP | 10.43.111.187 | 80/TCP,90/TCP |
| devtroncd | kubelink-service-headless | ClusterIP | None | 50051/TCP |
| devtroncd | lens-service | ClusterIP | 10.43.139.171 | 80/TCP |
| devtroncd | postgresql-postgresql | ClusterIP | 10.43.62.64 | 5432/TCP |
| devtroncd | postgresql-postgresql-headless | ClusterIP | None | 5432/TCP |
| devtroncd | postgresql-postgresql-metrics | ClusterIP | 10.43.57.221 | 9187/TCP |
| docs | cm-acme-http-solver-mgqp9 | NodePort | 10.43.2.59 | 8089:31866/TCP |
| docs | megatron-docs | ClusterIP | 10.43.219.13 | 80/TCP |
| docs | outline | NodePort | 10.43.21.18 | 3000:30080/TCP |
| docs | outline-postgres | ClusterIP | 10.43.127.243 | 5432/TCP |
| docs | outline-redis | ClusterIP | 10.43.106.242 | 6379/TCP |
| docs | wikijs | NodePort | 10.43.181.108 | 3000:30081/TCP |
| glamhub | admin-app | NodePort | 10.43.2.210 | 4322:30322/TCP |
| glamhub | astro-site | NodePort | 10.43.138.59 | 4321:30321/TCP |
| glamhub | directus | NodePort | 10.43.193.53 | 8055:30055/TCP |
| glamhub | glamhub-analytics | ClusterIP | 10.43.251.38 | 80/TCP |
| glamhub | glamhub-cms | ClusterIP | 10.43.42.144 | 80/TCP |
| glamhub | glamhub-web | ClusterIP | 10.43.169.97 | 80/TCP |
| glamhub | haystack | ClusterIP | 10.43.54.228 | 8080/TCP |
| glamhub | n8n | NodePort | 10.43.44.173 | 5678:30678/TCP |
| glamhub | ollama | ClusterIP | 10.43.78.255 | 11434/TCP |
| glamhub | postgresql | ClusterIP | 10.43.177.191 | 5432/TCP |
| glamhub | qdrant | ClusterIP | 10.43.35.96 | 6333/TCP,6334/TCP |
| glamhub | redis | ClusterIP | 10.43.70.218 | 6379/TCP |
| glamhub | umami | ClusterIP | 10.43.241.96 | 3000/TCP |
| glamhub-dev | admin-app | ClusterIP | 10.43.182.169 | 4322/TCP |
| gpu-operator | gpu-operator | ClusterIP | 10.43.102.80 | 8080/TCP |
| gpu-operator | nvidia-dcgm-exporter | ClusterIP | 10.43.193.168 | 9400/TCP |
| idp | idp-core | ClusterIP | 10.43.182.245 | 80/TCP |
| jupyterhub | hub | ClusterIP | 10.43.180.201 | 8081/TCP |
| jupyterhub | proxy-api | ClusterIP | 10.43.252.3 | 8001/TCP |
| jupyterhub | proxy-public | NodePort | 10.43.250.21 | 80:30888/TCP |
| kelsey | kelsey-app | ClusterIP | 10.43.59.243 | 80/TCP |
| kube-system | kube-dns | ClusterIP | 10.43.0.10 | 53/UDP,53/TCP,9153/TCP |
| kube-system | metrics-server | ClusterIP | 10.43.53.37 | 443/TCP |
| kube-system | traefik | LoadBalancer | 10.43.133.6 | 80:32521/TCP,443:32672/TCP |
| kubeflow | training-operator | ClusterIP | 10.43.47.33 | 8080/TCP,443/TCP |
| linkerd | linkerd-dst | ClusterIP | 10.43.24.142 | 8086/TCP |
| linkerd | linkerd-dst-headless | ClusterIP | None | 8086/TCP |
| linkerd | linkerd-identity | ClusterIP | 10.43.208.111 | 8080/TCP |
| linkerd | linkerd-identity-headless | ClusterIP | None | 8080/TCP |
| linkerd | linkerd-policy | ClusterIP | None | 8090/TCP |
| linkerd | linkerd-policy-validator | ClusterIP | 10.43.92.188 | 443/TCP |
| linkerd | linkerd-proxy-injector | ClusterIP | 10.43.96.22 | 443/TCP |
| linkerd | linkerd-sp-validator | ClusterIP | 10.43.223.192 | 443/TCP |
| linkerd-viz | metrics-api | ClusterIP | 10.43.109.21 | 8085/TCP |
| linkerd-viz | prometheus | ClusterIP | 10.43.246.102 | 9090/TCP |
| linkerd-viz | tap | ClusterIP | 10.43.209.169 | 8088/TCP,443/TCP |
| linkerd-viz | tap-injector | ClusterIP | 10.43.15.136 | 443/TCP |
| linkerd-viz | web | ClusterIP | 10.43.210.67 | 8084/TCP,9994/TCP |
| longhorn-system | longhorn-admission-webhook | ClusterIP | 10.43.8.12 | 9502/TCP |
| longhorn-system | longhorn-backend | ClusterIP | 10.43.94.175 | 9500/TCP |
| longhorn-system | longhorn-frontend | ClusterIP | 10.43.98.120 | 80/TCP |
| longhorn-system | longhorn-recovery-backend | ClusterIP | 10.43.58.0 | 9503/TCP |
| minio | minio | NodePort | 10.43.166.55 | 9000:30900/TCP |
| minio | minio-console | NodePort | 10.43.48.237 | 9001:30901/TCP |
| monitoring | alertmanager | ClusterIP | 10.43.110.32 | 9093/TCP |
| monitoring | alertmanager-headless | ClusterIP | None | 9093/TCP |
| monitoring | cm-acme-http-solver-fbnjp | NodePort | 10.43.136.145 | 8089:32569/TCP |
| monitoring | grafana | ClusterIP | 10.43.125.84 | 3000/TCP |
| monitoring | loki | ClusterIP | 10.43.105.30 | 3100/TCP |
| monitoring | prometheus-kube-state-metrics | ClusterIP | 10.43.103.74 | 8080/TCP |
| monitoring | prometheus-prometheus-node-exporter | ClusterIP | 10.43.52.6 | 9100/TCP |
| monitoring | prometheus-prometheus-pushgateway | ClusterIP | 10.43.192.119 | 9091/TCP |
| monitoring | prometheus-server | ClusterIP | 10.43.219.35 | 80/TCP |
| nats | nats | ClusterIP | 10.43.48.52 | 4222/TCP |
| nats | nats-headless | ClusterIP | None | 4222/TCP,8222/TCP |
| openfaas | gateway | ClusterIP | 10.43.165.80 | 8080/TCP |
| openfaas | alertmanager | ClusterIP | 10.43.141.164 | 9093/TCP |
| openfaas | gateway-external | NodePort | 10.43.187.167 | 8080:31112/TCP |
| openfaas | nats | ClusterIP | 10.43.6.26 | 4222/TCP |
| openfaas | prometheus | ClusterIP | 10.43.176.19 | 9090/TCP |
| openfaas-fn | figlet | ClusterIP | 10.43.147.203 | 8080/TCP |
| portal | portal | NodePort | 10.43.170.125 | 80:30000/TCP |
| registry | harbor-core | ClusterIP | 10.43.175.92 | 80/TCP,8001/TCP |
| registry | harbor | NodePort | 10.43.22.137 | 80:30500/TCP |
| registry | cm-acme-http-solver-fsrl9 | NodePort | 10.43.250.194 | 8089:30362/TCP |
| registry | harbor-database | ClusterIP | 10.43.118.34 | 5432/TCP |
| registry | harbor-exporter | ClusterIP | 10.43.34.30 | 8001/TCP |
| registry | harbor-jobservice | ClusterIP | 10.43.9.65 | 80/TCP,8001/TCP |
| registry | harbor-portal | ClusterIP | 10.43.237.112 | 80/TCP |
| registry | harbor-redis | ClusterIP | 10.43.72.119 | 6379/TCP |
| registry | harbor-registry | ClusterIP | 10.43.28.119 | 5000/TCP,8080/TCP,8001/TCP |
| registry | harbor-trivy | ClusterIP | 10.43.40.123 | 8080/TCP |
| sonarqube | sonarqube-sonarqube | NodePort | 10.43.169.146 | 9000:30090/TCP |
| stiq | stiq-admin | ClusterIP | 10.43.11.18 | 80/TCP |
| stiq | stiq-web | ClusterIP | 10.43.192.214 | 80/TCP |
| stiq | stiq-marketing | ClusterIP | 10.43.234.220 | 80/TCP |
| stiq | stiq-api | ClusterIP | 10.43.144.71 | 3000/TCP |
| stiq-dev | stiq-api | ClusterIP | 10.43.86.210 | 3000/TCP |
| stiq-dev | stiq-marketing | ClusterIP | 10.43.209.200 | 80/TCP |
| stiq-dev | stiq-web | ClusterIP | 10.43.11.172 | 80/TCP |
| stiq-dev | stiq-admin | ClusterIP | 10.43.193.82 | 80/TCP |
| stiq-staging | stiq-admin | ClusterIP | 10.43.217.158 | 80/TCP |
| stiq-staging | stiq-web | ClusterIP | 10.43.84.244 | 80/TCP |
| stiq-staging | stiq-marketing | ClusterIP | 10.43.126.208 | 80/TCP |
| stiq-staging | stiq-api | ClusterIP | 10.43.103.228 | 3000/TCP |
| vault | vault | ClusterIP | 10.43.32.234 | 8200/TCP,8201/TCP |
| vault | vault-agent-injector-svc | ClusterIP | 10.43.98.236 | 443/TCP |
| vault | vault-internal | ClusterIP | None | 8200/TCP,8201/TCP |
| velero | velero | ClusterIP | 10.43.26.97 | 8085/TCP |
Ingresses
| Namespace | Name | Hosts | Address |
|---|---|---|---|
| aegis | aegis-ingress | aegis.m3gatr0n.com,api.aegis.m3gatr0n.com | 10.0.0.85 |
| authentik | authentik-server | auth.m3gatr0n.com | 10.0.0.85 |
| corestation | corestation-ingress | corestation.io,app.corestation.io,api.corestation.io | + |
| devtroncd | cm-acme-http-solver-vxm9r | platform.m3gatr0n.com | 10.0.0.85 |
| devtroncd | devtron-dashboard | platform.m3gatr0n.com | 10.0.0.85 |
| docs | cm-acme-http-solver-cdglw | docs.m3gatr0n.com | 10.0.0.85 |
| docs | megatron-docs | docs.m3gatr0n.com | 10.0.0.85 |
| docs | wikijs | wiki.m3gatr0n.com | 10.0.0.85 |
| glamhub | glamhub-ingress | glamhub.com,www.glamhub.com,admin.glamhub.com | + |
| idp | idp-ingress | idp.pro,api.idp.pro,app.idp.pro | 10.0.0.85 |
| kelsey | kelsey-app | kelseyfarmequipment.com,www.kelseyfarmequipment.com,api.kelseyfarmequipment.com | 10.0.0.85 |
| monitoring | alertmanager | alertmanager.m3gatr0n.com | 10.0.0.85 |
| monitoring | cm-acme-http-solver-9sd6c | grafana.10-0-0-36.sslip.io | 10.0.0.85 |
| monitoring | grafana | grafana.m3gatr0n.com | 10.0.0.85 |
| monitoring | grafana-ingress | grafana.stiq.us | 10.0.0.85 |
| monitoring | prometheus | prometheus.m3gatr0n.com | 10.0.0.85 |
| registry | cm-acme-http-solver-n6nh4 | registry.m3gatr0n.com | 10.0.0.85 |
| registry | harbor-portal | registry.m3gatr0n.com | 10.0.0.85 |
| stiq-dev | stiq-ingress | dev-api.stiq.us,dev-app.stiq.us,dev.stiq.us | + |
| stiq-staging | stiq-ingress | staging-api.stiq.us,staging-app.stiq.us,staging.stiq.us | + |
| stiq | stiq-ingress | api.stiq.us,app.stiq.us,stiq.us | + |
Certificates
| Namespace | Name | Ready | Secret | Age |
|---|---|---|---|---|
| cert-manager | kuber-ca | True | kuber-ca-secret | 87d |
| devtroncd | devtron-tls | False | devtron-tls | 20d |
| docs | megatron-docs-tls | False | megatron-docs-tls | 5m33s |
| kube-system | traefik-dashboard-tls | True | traefik-dashboard-tls | 87d |
| kube-system | wildcard-sslip | True | wildcard-sslip-tls | 87d |
| monitoring | wildcard-sslip-tls | False | wildcard-sslip-tls | 87d |
| registry | harbor-tls | False | harbor-tls | 20d |
Storage Classes
Kubernetes storage classes define how persistent volumes are provisioned in the K3s cluster.
Available Storage Classes
| Storage Class | Provisioner | Reclaim Policy | Default | Notes |
|---|---|---|---|---|
| local-path | rancher.io/local-path | Delete | Yes (K3s default) | Uses local node storage |
| longhorn | driver.longhorn.io | Delete | No | Distributed replicated storage |
local-path (K3s Default)
The K3s default storage class uses the local-path provisioner, which creates PersistentVolumes on the local filesystem of the node where the pod is scheduled.
- Pros: Simple, fast, no additional infrastructure
- Cons: No replication, data lost if node fails, pod-to-node affinity required
- Best for: Non-critical workloads, ephemeral data, development environments
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
Longhorn (Distributed)
Longhorn provides distributed block storage with replication across the three cluster nodes (megatron, thing1, thing2).
- Pros: Data replication (configurable replicas), snapshots, backups, web UI
- Cons: Higher resource overhead, network-dependent I/O, more complex
- Best for: Databases, stateful applications, anything requiring data durability
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-durable-pvc
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
Quick Commands
# List storage classes
kubectl get storageclass
# List persistent volumes
kubectl get pv
# List persistent volume claims across all namespaces
kubectl get pvc -A
# Check Longhorn volumes
kubectl get volumes.longhorn.io -n longhorn-system
# Check Longhorn replicas
kubectl get replicas.longhorn.io -n longhorn-system
Choosing a Storage Class
| Use Case | Recommended Class | Reason |
|---|---|---|
| Database (production) | longhorn | Replication for durability |
| Database (dev) | local-path | Performance, simplicity |
| Container registry | longhorn | Large volumes, durability |
| Temporary build artifacts | local-path | Speed, disposable |
| Secrets/config | longhorn | Durability across restarts |
TODO: expand with Longhorn backup configuration, snapshot policies, and volume health monitoring.
Application Index
All applications hosted on MEGATRON, including Kubernetes-based services and Docker containers.
Production Applications
| Application | Domain(s) | Namespaces | Tech Stack | Environments | Status |
|---|---|---|---|---|---|
| STIQ | stiq.us, api/app/admin.stiq.us | stiq, stiq-dev, stiq-staging | SaaS platform | prod, dev, staging | Running |
| GlamHub | glamhub.m3gatr0n.com + subdomains | glamhub, glamhub-dev | Astro 6, Directus 11, Umami, N8N, Ollama, Qdrant | prod, dev | Running |
| CoreStation | corestation.io, api/app/admin.corestation.io | corestation, corestation-dev, corestation-staging | Fire Department SaaS | prod, dev, staging | Running |
| IDP | idp.pro, api/app.idp.pro | idp, idp-dev | Identity Provider platform | prod, dev | Running |
| Kelsey Equipment | kelseyfarmequipment.com, www/api.kelsey... | kelsey, kelsey-dev | Farm equipment e-commerce | prod, dev | Running |
| Aegis VPN | aegis.m3gatr0n.com, api/vpn.aegis... | aegis, aegis-dev | VPN service | prod, dev | Running |
| Bibliotheca | localhost:8080 (Docker) | Docker containers | Book management, TTS, qBittorrent, Meilisearch | single | Partial (categorizer restarting) |
Infrastructure Services
| Service | Domain | Namespace | Purpose | Status |
|---|---|---|---|---|
| Authentik | auth.m3gatr0n.com | authentik | OIDC/SSO provider | Running |
| Vault | (internal) | vault | Secrets management | Running (3h51m uptime) |
| Harbor | registry.m3gatr0n.com | registry | Container registry | TLS NOT READY |
| Devtron | platform.m3gatr0n.com | devtroncd | CI/CD GitOps | TLS NOT READY |
| Prometheus | prometheus.m3gatr0n.com | monitoring | Metrics collection | Running |
| Grafana | grafana.m3gatr0n.com | monitoring | Visualization | Running |
| Loki | (internal) | monitoring | Log aggregation | Running |
| AlertManager | alertmanager.m3gatr0n.com | monitoring | Alert routing | 203% CPU issue |
| Longhorn | (internal) | longhorn-system | Distributed storage | Running |
| Linkerd | (internal) | linkerd | Service mesh | Running (11h old) |
| MLflow | (internal) | ai-ml | ML experiment tracking | Running |
| Ollama | (internal) | ai-ml, glamhub | LLM inference (port 11434) | Running |
| JupyterHub | (internal) | jupyterhub | Notebook server | Running |
| OpenFaaS | (internal) | openfaas | Serverless functions | Running |
| Argo Workflows | (internal) | argo | Workflow orchestration | Running |
| cert-manager | (internal) | cert-manager | TLS cert automation | Running (issuer broken) |
| Coolify | localhost:8000 | Docker | PaaS platform | Running |
Docker-Only Containers
| Container | Purpose | Status |
|---|---|---|
| bibliotheca-web | Book management web UI | Running |
| bibliotheca-torrent | qBittorrent download client | Running |
| bibliotheca-vpn | Gluetun VPN for torrent | Running (healthy) |
| bibliotheca-tts | GPU-accelerated TTS | Running |
| bibliotheca-nginx | Reverse proxy | Running |
| bibliotheca-discovery | Book discovery service | Running |
| bibliotheca-categorizer | Book categorization | RESTARTING |
| coolify | PaaS platform | Running |
| mariadb:11 | Coolify database | Running |
| redis:7-alpine | Coolify cache | Running |
| meilisearch | Search engine | Running |
Domain Map
stiq.us ─────────────────────> stiq namespace
├── api.stiq.us
├── app.stiq.us
├── admin.stiq.us
├── dev*.stiq.us ──────────> stiq-dev namespace
└── staging*.stiq.us ─────> stiq-staging namespace
corestation.io ──────────────> corestation namespace
├── api.corestation.io
├── app.corestation.io
├── admin.corestation.io
├── dev*.corestation.io ──> corestation-dev namespace
└── staging*.corestation ─> corestation-staging namespace
idp.pro ─────────────────────> idp namespace
├── api.idp.pro
├── app.idp.pro
└── dev*.idp.pro ─────────> idp-dev namespace
kelseyfarmequipment.com ─────> kelsey namespace
├── www.kelseyfarmequipment.com
└── api.kelseyfarmequipment.com
m3gatr0n.com (infrastructure)
├── glamhub.m3gatr0n.com ─> glamhub namespace
├── auth.m3gatr0n.com ────> authentik namespace
├── aegis.m3gatr0n.com ───> aegis namespace
├── registry.m3gatr0n.com > registry namespace
├── platform.m3gatr0n.com > devtroncd namespace
├── grafana.m3gatr0n.com ─> monitoring namespace
├── prometheus.m3gatr0n.com > monitoring namespace
└── alertmanager.m3gatr0n.com > monitoring namespace
Application Details
- STIQ -- SaaS platform with 3 environments
- GlamHub -- Content platform with Astro, Directus, and AI components
- CoreStation -- Fire department SaaS
- IDP -- Identity provider platform
- Kelsey Farm Equipment -- E-commerce
- Aegis VPN -- VPN service
- Bibliotheca -- Docker-based book management system
GlamHub
GlamHub is a content management and publishing platform running on the MEGATRON cluster. It features a modern frontend, headless CMS, analytics, workflow automation, and AI-powered features.
Overview
| Property | Value |
|---|---|
| Primary Domain | glamhub.m3gatr0n.com |
| Namespaces | glamhub (prod), glamhub-dev (dev) |
| Frontend | Astro 6 |
| CMS | Directus 11 |
| Analytics | Umami |
| Automation | N8N |
| LLM Inference | Ollama |
| Vector Search | Qdrant |
URLs
| Service | Production URL | Dev URL |
|---|---|---|
| Frontend | glamhub.m3gatr0n.com | dev-glamhub.m3gatr0n.com |
| Admin (Directus) | admin-glamhub.m3gatr0n.com | dev-admin-glamhub.m3gatr0n.com |
| CMS API | cms-glamhub.m3gatr0n.com | dev-cms-glamhub.m3gatr0n.com |
| N8N Workflows | n8n-glamhub.m3gatr0n.com | dev-n8n-glamhub.m3gatr0n.com |
Architecture
┌─────────────────────────────────────┐
│ glamhub namespace │
│ │
glamhub.m3gatr0n │ ┌──────────┐ ┌──────────────┐ │
─────────────────>│ │ Astro 6 │───>│ Directus 11 │ │
│ │ Frontend │ │ Headless CMS │ │
│ └──────────┘ └──────┬───────┘ │
│ │ │
admin-glamhub │ ┌──────────────────────┘ │
─────────────────>│ │ │
│ v │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Database │ │ Umami │ │
│ │ (Postgres│ │ Analytics │ │
│ │ or SQL) │ └──────────────┘ │
│ └──────────┘ │
│ │
n8n-glamhub │ ┌──────────┐ ┌──────────────┐ │
─────────────────>│ │ N8N │───>│ Ollama │ │
│ │ Workflows│ │ LLM Engine │ │
│ └──────────┘ └──────────────┘ │
│ │
│ ┌──────────────┐ │
│ │ Qdrant │ │
│ │ Vector Store │ │
│ └──────────────┘ │
└─────────────────────────────────────┘
Component Details
Astro 6 (Frontend)
- Static site generation with server-side rendering
- Modern web framework for content-driven sites
- Connected to Directus for dynamic content
Directus 11 (Headless CMS)
- API-first content management
- Admin dashboard at admin-glamhub.m3gatr0n.com
- RESTful and GraphQL APIs
- Role-based access control
Umami (Analytics)
- Privacy-focused web analytics
- Lightweight alternative to Google Analytics
- Tracks page views, events, and user sessions
N8N (Workflow Automation)
- Visual workflow builder
- Connects to Ollama for AI-powered content workflows
- Scheduled tasks and event-driven automation
- Accessible at n8n-glamhub.m3gatr0n.com
Ollama (LLM Inference)
- Local LLM serving on port 11434
- Used by N8N for content generation, summarization, and processing
- Also available in the ai-ml namespace for other workloads
- GPU-accelerated inference using RTX 3090
Qdrant (Vector Database)
- Vector similarity search engine
- Stores embeddings for semantic search over content
- Supports RAG (Retrieval-Augmented Generation) workflows with Ollama
Environments
| Environment | Namespace | Purpose |
|---|---|---|
| Production | glamhub | Live site serving real users |
| Development | glamhub-dev | Active development and testing |
Quick Commands
# Check pods in glamhub namespace
kubectl get pods -n glamhub
# Check services
kubectl get svc -n glamhub
# View logs for Directus
kubectl logs -n glamhub -l app=directus --tail=100 -f
# Restart a component
kubectl rollout restart deployment/astro -n glamhub
STIQ
STIQ is a SaaS platform hosted on the MEGATRON cluster with full multi-environment support across production, development, and staging.
Overview
| Property | Value |
|---|---|
| Primary Domain | stiq.us |
| Type | SaaS Platform |
| Namespaces | stiq, stiq-dev, stiq-staging |
| Environments | Production, Development, Staging |
URLs
Production (stiq namespace)
| Service | URL |
|---|---|
| Main Site | stiq.us |
| API | api.stiq.us |
| Application | app.stiq.us |
| Admin Panel | admin.stiq.us |
Development (stiq-dev namespace)
| Service | URL |
|---|---|
| Main Site | dev.stiq.us |
| API | dev-api.stiq.us |
| Application | dev-app.stiq.us |
| Admin Panel | dev-admin.stiq.us |
Staging (stiq-staging namespace)
| Service | URL |
|---|---|
| Main Site | staging.stiq.us |
| API | staging-api.stiq.us |
| Application | staging-app.stiq.us |
| Admin Panel | staging-admin.stiq.us |
Architecture
stiq.us
│
v
┌────────────────────────┐
│ Cloudflare Tunnel │
└───────────┬────────────┘
│
v
┌────────────────────────┐
│ Traefik Ingress │
│ Host-based routing │
└───────────┬────────────┘
│
┌───────────────┼───────────────┐
v v v
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ stiq (prod) │ │ stiq-dev │ │ stiq-staging │
│ │ │ │ │ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │
│ │ App │ │ │ │ App │ │ │ │ App │ │
│ │ Frontend │ │ │ │ Frontend │ │ │ │ Frontend │ │
│ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │
│ │ API │ │ │ │ API │ │ │ │ API │ │
│ │ Backend │ │ │ │ Backend │ │ │ │ Backend │ │
│ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │
│ │ Admin │ │ │ │ Admin │ │ │ │ Admin │ │
│ │ Panel │ │ │ │ Panel │ │ │ │ Panel │ │
│ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │
│ │ Database │ │ │ │ Database │ │ │ │ Database │ │
│ └──────────┘ │ │ └──────────┘ │ │ └──────────┘ │
└──────────────┘ └──────────────┘ └──────────────┘
Environment Promotion
Code changes flow through the environments:
Development (stiq-dev)
│
│ Manual promotion / PR merge
v
Staging (stiq-staging)
│
│ Validation + approval
v
Production (stiq)
Networking
All STIQ subdomains are routed through the Cloudflare tunnel using Pattern B:
- Hostname matched at Cloudflare
- Proxied to
https://localhost:32672(Traefik NodePort) withnoTLSVerify - Traefik routes to the correct namespace based on hostname
Quick Commands
# Check all STIQ pods across environments
kubectl get pods -n stiq
kubectl get pods -n stiq-dev
kubectl get pods -n stiq-staging
# View services
kubectl get svc -n stiq
# View ingress routes
kubectl get ingressroute -n stiq
# Tail API logs
kubectl logs -n stiq -l app=api --tail=100 -f
# Scale API replicas
kubectl scale deployment/api -n stiq --replicas=3
CoreStation
CoreStation is a SaaS platform designed for fire departments, running on the MEGATRON cluster with three environments.
Overview
| Property | Value |
|---|---|
| Primary Domain | corestation.io |
| Type | Fire Department SaaS |
| Namespaces | corestation, corestation-dev, corestation-staging |
| Environments | Production, Development, Staging |
| Source Code | /home/lucas/fire-department-saas/ |
URLs
Production (corestation namespace)
| Service | URL |
|---|---|
| Main Site | corestation.io |
| API | api.corestation.io |
| Application | app.corestation.io |
| Admin Panel | admin.corestation.io |
Development (corestation-dev namespace)
| Service | URL |
|---|---|
| Main Site | dev.corestation.io |
| API | dev-api.corestation.io |
| Application | dev-app.corestation.io |
| Admin Panel | dev-admin.corestation.io |
Staging (corestation-staging namespace)
| Service | URL |
|---|---|
| Main Site | staging.corestation.io |
| API | staging-api.corestation.io |
| Application | staging-app.corestation.io |
| Admin Panel | staging-admin.corestation.io |
Architecture
CoreStation follows the same multi-environment pattern as STIQ:
corestation.io
│
v
Cloudflare Tunnel ──> Traefik ──> corestation namespace
├── app (frontend)
├── api (backend)
├── admin (admin panel)
└── database
Deployment
CoreStation has Kustomize-based deployment manifests:
/home/lucas/fire-department-saas/deploy/k8s/
├── base/ # Base manifests
├── overlays/
│ ├── dev/ # Development overrides
│ └── prod/ # Production overrides
Apply with:
# Development
kubectl apply -k /home/lucas/fire-department-saas/deploy/k8s/overlays/dev/
# Production
kubectl apply -k /home/lucas/fire-department-saas/deploy/k8s/overlays/prod/
Quick Commands
# Check pods across all environments
for ns in corestation corestation-dev corestation-staging; do
echo "=== $ns ===" && kubectl get pods -n $ns
done
# View logs
kubectl logs -n corestation -l app=api --tail=100 -f
# Restart deployment
kubectl rollout restart deployment/api -n corestation
IDP
IDP is an identity provider platform hosted on MEGATRON with production and development environments.
Overview
| Property | Value |
|---|---|
| Primary Domain | idp.pro |
| Type | Identity Provider Platform |
| Namespaces | idp (prod), idp-dev (dev) |
| Environments | Production, Development |
| Source Code | /home/lucas/idp/ |
| IaC | Helm charts at /home/lucas/idp/infra/charts/ |
URLs
Production (idp namespace)
| Service | URL |
|---|---|
| Main Site | idp.pro |
| API | api.idp.pro |
| Application | app.idp.pro |
Development (idp-dev namespace)
| Service | URL |
|---|---|
| Main Site | dev.idp.pro |
| API | dev-api.idp.pro |
| Application | dev-app.idp.pro |
Helm Charts
IDP has a comprehensive set of Helm charts at /home/lucas/idp/infra/charts/:
| Chart | Purpose |
|---|---|
| core-platform | Main IDP application stack |
| argocd | GitOps continuous delivery |
| external-dns | Automatic DNS record management |
| cnpg | CloudNativePG PostgreSQL operator |
| weaviate | Vector database for semantic search |
| grafana | IDP-specific monitoring dashboards |
Quick Commands
kubectl get pods -n idp
kubectl get pods -n idp-dev
kubectl get svc -n idp
helm list -n idp
TODO: expand with architecture diagram, deployment procedures, and database details.
Kelsey Farm Equipment
Kelsey Farm Equipment is an e-commerce platform for farm and irrigation equipment.
Overview
| Property | Value |
|---|---|
| Primary Domain | kelseyfarmequipment.com |
| Type | E-commerce |
| Namespaces | kelsey, kelsey-dev |
| Environments | Production, Development |
| Source Code | /home/lucas/irrigation-parts/ |
| IaC | Helm at /home/lucas/irrigation-parts/deploy/helm/, Kustomize at /home/lucas/irrigation-parts/deploy/k8s/ |
URLs
| Service | Production | Development |
|---|---|---|
| Main Site | kelseyfarmequipment.com | dev.kelseyfarmequipment.com |
| WWW | www.kelseyfarmequipment.com | - |
| API | api.kelseyfarmequipment.com | - |
Deployment
Kelsey has both Helm and Kustomize deployment options:
Kustomize Overlays
/home/lucas/irrigation-parts/deploy/k8s/
├── base/
├── overlays/
│ ├── demo/
│ ├── dev/
│ ├── qa/
│ └── prod/
# Deploy to dev
kubectl apply -k /home/lucas/irrigation-parts/deploy/k8s/overlays/dev/
# Deploy to prod
kubectl apply -k /home/lucas/irrigation-parts/deploy/k8s/overlays/prod/
Quick Commands
kubectl get pods -n kelsey
kubectl get svc -n kelsey
TODO: expand with architecture diagram, product catalog details, and payment integration.
Bibliotheca
Bibliotheca is a Docker-based book management system running outside of Kubernetes. It provides book discovery, download, categorization, text-to-speech conversion, and full-text search.
Overview
| Property | Value |
|---|---|
| Platform | Docker Compose (not K3s) |
| Access | localhost:8080 (qBittorrent UI), localhost:8088 (nginx) |
| Location | /home/lucas/bibliotheca/ |
| GPU | Yes (TTS container uses NVIDIA GPU) |
Container Inventory
| Container | Image | Status | Ports | Purpose |
|---|---|---|---|---|
| bibliotheca-web | custom | Running (2+ weeks) | - | Web UI for book management |
| bibliotheca-torrent | linuxserver/qbittorrent | Running (37h) | 8080 | BitTorrent download client |
| bibliotheca-vpn | qmcgaw/gluetun | Running (37h, healthy) | 6881 | VPN tunnel for torrent traffic |
| bibliotheca-tts | custom (NVIDIA GPU) | Running (2+ weeks) | - | GPU-accelerated text-to-speech |
| bibliotheca-nginx | nginx | Running (2+ weeks) | 8088 | Reverse proxy for services |
| bibliotheca-discovery | custom | Running (2+ weeks) | - | Book discovery and metadata |
| bibliotheca-categorizer | custom | RESTARTING | - | Book categorization (broken) |
Known Issue:
bibliotheca-categorizeris continuously restarting. See Current Issues.
Architecture
┌──────────────────────────────────────────────────────┐
│ Bibliotheca Stack │
│ (Docker Compose) │
│ │
│ ┌──────────────┐ ┌────────────────────────────┐ │
│ │ nginx :8088 │────>│ bibliotheca-web │ │
│ │ (reverse │ │ Book management UI │ │
│ │ proxy) │ └────────────────────────────┘ │
│ └──────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────┐│
│ │ bibliotheca-discovery ││
│ │ Finds books, fetches metadata ││
│ └───────────────────────┬──────────────────────────┘│
│ │ │
│ v │
│ ┌──────────────────────────────────────────────────┐│
│ │ bibliotheca-vpn (Gluetun) ││
│ │ ┌────────────────────────────────────────────┐ ││
│ │ │ bibliotheca-torrent (qBittorrent) :8080 │ ││
│ │ │ Downloads via VPN tunnel │ ││
│ │ └────────────────────────────────────────────┘ ││
│ └──────────────────────────────────────────────────┘│
│ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ bibliotheca-tts │ │ bibliotheca-categorizer │ │
│ │ Text-to-Speech │ │ Book categorization │ │
│ │ (NVIDIA GPU) │ │ STATUS: RESTARTING │ │
│ └──────────────────┘ └──────────────────────────┘ │
│ │
│ External: Meilisearch :7700 (full-text search) │
└──────────────────────────────────────────────────────┘
Network Topology
The torrent container runs inside the Gluetun VPN container's network namespace, ensuring all download traffic is routed through the VPN:
Internet <──> Gluetun VPN <──> qBittorrent
│
└── Port 6881 (torrent)
└── Port 8080 (qBittorrent web UI)
Services
qBittorrent (Torrent Client)
- Web UI: http://localhost:8080
- Image: linuxserver/qbittorrent
- Runs inside Gluetun VPN network for privacy
- Port 6881 for BitTorrent protocol
Gluetun (VPN)
- Image: qmcgaw/gluetun
- Health-checked container
- Provides VPN network namespace for qBittorrent
- Status: Healthy
Text-to-Speech (TTS)
- Custom image with NVIDIA GPU support
- Converts ebooks to audio format
- Uses RTX 3090 for accelerated inference
- Running for 2+ weeks
Meilisearch (Search)
- Port: 7700
- Image: getmeili/meilisearch
- Full-text search engine for book metadata and content
- Running for 4 weeks
Discovery
- Custom service for finding and fetching book metadata
- Running for 2+ weeks
Categorizer
- Automatically categorizes books by genre/topic
- Currently broken -- continuously restarting
Management
# Check container status
docker ps --filter "name=bibliotheca"
# View logs for the failing categorizer
docker logs bibliotheca-categorizer --tail=50
# Restart the entire stack
cd /home/lucas/bibliotheca/ && docker compose restart
# Restart a specific container
docker restart bibliotheca-torrent
# Access qBittorrent UI
# Open http://localhost:8080 in browser
# Check Gluetun VPN health
docker inspect bibliotheca-vpn | jq '.[0].State.Health'
Aegis VPN
Aegis is a VPN service hosted on MEGATRON with multi-cloud infrastructure managed by Terraform.
Overview
| Property | Value |
|---|---|
| Primary Domain | aegis.m3gatr0n.com |
| Type | VPN Service |
| Namespaces | aegis (prod), aegis-dev (dev) |
| Environments | Production, Development |
| Source Code | /home/lucas/vpn/ |
| IaC | Terraform at /home/lucas/vpn/infrastructure/terraform/, Helm at /home/lucas/vpn/charts/aegis/, Kustomize at /home/lucas/vpn/k8s/ |
URLs
| Service | Production | Development |
|---|---|---|
| Main | aegis.m3gatr0n.com | dev-aegis.m3gatr0n.com |
| API | api.aegis.m3gatr0n.com | - |
| VPN | vpn.m3gatr0n.com | - |
Multi-Cloud Infrastructure
Aegis VPN has Terraform configurations for deploying VPN endpoints across multiple cloud providers:
| Provider | Location |
|---|---|
| AWS | /home/lucas/vpn/infrastructure/terraform/aws/ |
| Azure | /home/lucas/vpn/infrastructure/terraform/azure/ |
| GCP | /home/lucas/vpn/infrastructure/terraform/gcp/ |
| DigitalOcean | /home/lucas/vpn/infrastructure/terraform/do/ |
| Hetzner | /home/lucas/vpn/infrastructure/terraform/hetzner/ |
| Vultr | /home/lucas/vpn/infrastructure/terraform/vultr/ |
| Oracle Cloud | /home/lucas/vpn/infrastructure/terraform/oracle/ |
Kustomize Overlays
/home/lucas/vpn/k8s/
├── base/
├── overlays/
│ ├── megatron/
│ ├── dev/
│ └── prod/
Quick Commands
kubectl get pods -n aegis
kubectl get pods -n aegis-dev
TODO: expand with VPN architecture, client configuration, and cloud deployment procedures.
Other Applications
Additional applications and services not covered by individual pages.
Coolify
| Property | Value |
|---|---|
| Type | PaaS Platform |
| Platform | Docker (not K3s) |
| URL | localhost:8000 |
| Image | ghcr.io/coollabsio/coolify |
| Status | Running (2 months) |
| Database | MariaDB 11 (port 3307) |
| Cache | Redis 7 Alpine (port 6380) |
Coolify is a self-hosted PaaS (Platform as a Service) for deploying applications. It runs as a Docker container alongside its MariaDB database and Redis cache.
Forgejo (Git)
| Property | Value |
|---|---|
| Domain | git.m3gatr0n.com |
| SSH Port | 2223 |
| Platform | K3s (likely) or Docker |
Self-hosted Git forge for source code management.
# Git clone via SSH
git clone ssh://git@megatron:2223/user/repo.git
Meilisearch
| Property | Value |
|---|---|
| Port | 7700 |
| Platform | Docker |
| Image | getmeili/meilisearch |
| Status | Running (4 weeks) |
Full-text search engine used by the Bibliotheca stack for book search functionality.
SonarQube
| Property | Value |
|---|---|
| Namespace | sonarqube |
| Platform | K3s |
| Purpose | Code quality analysis |
TODO: expand with SonarQube configuration, project setup, and quality gate definitions.
MinIO / S3
| Property | Value |
|---|---|
| Domains | s3.m3gatr0n.com, minio.m3gatr0n.com |
| Purpose | S3-compatible object storage |
TODO: expand with bucket configuration and access credentials management.
Authentik (Auth)
Authentik is the SSO/OIDC identity provider for the MEGATRON cluster, providing centralized authentication for all services.
Overview
| Property | Value |
|---|---|
| Domain | auth.m3gatr0n.com |
| Namespace | authentik |
| Type | OIDC/SAML/LDAP identity provider |
| Components | Server, Worker, Redis, PostgreSQL |
Components
| Pod | Purpose | Status |
|---|---|---|
| authentik-server | Main Authentik application server | Running |
| authentik-worker | Background task processor | Running (12 restarts) |
Access
- Admin UI: https://auth.m3gatr0n.com/if/admin/
- User Portal: https://auth.m3gatr0n.com/
Capabilities
- OIDC/OAuth2 provider for application SSO
- SAML 2.0 for enterprise integrations
- LDAP outpost for legacy applications
- Flows and stages for customizable authentication
- MFA support (TOTP, WebAuthn, SMS)
kubectl get pods -n authentik
kubectl logs -n authentik -l app.kubernetes.io/name=authentik-server --tail=50
TODO: expand with OIDC client configurations, connected applications, and flow details.
HashiCorp Vault
Vault provides centralized secrets management for the MEGATRON cluster.
Overview
| Property | Value |
|---|---|
| Namespace | vault |
| Access | Internal (ClusterIP) on port 8200 |
| Uptime | 3h51m at last audit (recently restarted) |
| Status | Running |
Key Concerns
- Vault was recently restarted (only 3h51m uptime at audit). After a restart, Vault needs to be unsealed before it can serve secrets.
- Verify seal status:
kubectl exec -n vault vault-0 -- vault status
Quick Commands
kubectl get pods -n vault
kubectl exec -n vault vault-0 -- vault status
kubectl exec -n vault vault-0 -- vault secrets list
TODO: expand with secret engine configuration, policies, Kubernetes auth method, and backup procedures.
Harbor (Registry)
Harbor is a container image registry hosted on the MEGATRON cluster.
Overview
| Property | Value |
|---|---|
| Domain | registry.m3gatr0n.com |
| Namespace | registry |
| TLS Status | NOT READY (20 days) |
| Components | Core, database, Redis, Trivy (vulnerability scanning) |
Known Issue
The harbor-tls certificate has been NOT READY for 20 days due to the HTTP-01 ACME challenge failure behind the Cloudflare tunnel. See TLS Certificates and Certificate Renewal.
Usage
# Login (may fail due to TLS issue)
docker login registry.m3gatr0n.com
# Push an image
docker tag myapp:latest registry.m3gatr0n.com/project/myapp:latest
docker push registry.m3gatr0n.com/project/myapp:latest
# Check pods
kubectl get pods -n registry
TODO: expand with project configuration, robot accounts, replication rules, and vulnerability scanning setup.
Devtron (CI/CD)
Devtron is a CI/CD and GitOps platform running on the MEGATRON cluster.
Overview
| Property | Value |
|---|---|
| Domain | platform.m3gatr0n.com |
| Namespace | devtroncd |
| TLS Status | NOT READY (20 days) |
| Components | Devtron server, ArgoCD, NATS, PostgreSQL, Git Sensor, Dashboard |
Known Issue
The devtron-tls certificate has been NOT READY for 20 days. See TLS Certificates.
Components
| Component | Purpose |
|---|---|
| devtron | Main Devtron application |
| argocd-dex-server | OIDC provider for ArgoCD |
| dashboard | Devtron web UI |
| git-sensor | Git repository monitoring |
| kubelink | Kubernetes cluster connector |
| kubewatch | Kubernetes event watcher |
| devtron-nats | Message bus (NATS) |
| postgresql | Database |
kubectl get pods -n devtroncd
TODO: expand with pipeline configurations, connected repositories, and deployment workflows.
Prometheus & Grafana
The monitoring stack provides metrics collection, visualization, and alerting for the MEGATRON cluster.
Overview
| Component | Domain | Port | Namespace |
|---|---|---|---|
| Prometheus | prometheus.m3gatr0n.com | 9090 | monitoring |
| Grafana | grafana.m3gatr0n.com | 3000 | monitoring |
| AlertManager | alertmanager.m3gatr0n.com | 9093 | monitoring |
Prometheus
Prometheus scrapes metrics from Kubernetes pods, nodes, and services. Key metrics include:
- Node CPU, memory, disk, network
- Pod resource usage
- K3s API server latency
- Application-specific metrics
Grafana
Grafana provides dashboards for visualizing Prometheus metrics. Access at https://grafana.m3gatr0n.com.
AlertManager
AlertManager routes alerts from Prometheus to notification channels.
Known Issue: AlertManager is consuming 203% CPU (24K+ hours runtime). See Current Issues.
kubectl get pods -n monitoring
kubectl top pods -n monitoring
TODO: expand with dashboard inventory, alert rules, notification channels, and retention configuration.
Loki (Logs)
Loki is a log aggregation system in the monitoring namespace, designed for efficient log querying with Grafana.
Overview
| Property | Value |
|---|---|
| Namespace | monitoring |
| Access | Internal (ClusterIP) on port 3100 |
| Integration | Grafana (LogQL queries) |
How It Works
Loki collects logs from all pods via Promtail (or Grafana Agent) and indexes them by labels rather than full-text. Logs can be queried through Grafana using LogQL.
kubectl get pods -n monitoring -l app=loki
TODO: expand with retention policies, storage backend, LogQL query examples, and Promtail/Agent configuration.
AlertManager
AlertManager handles alert routing, deduplication, and notification from Prometheus.
Overview
| Property | Value |
|---|---|
| Domain | alertmanager.m3gatr0n.com |
| Namespace | monitoring |
| Port | 9093 |
| Status | 203% CPU (known issue) |
Known Issue
AlertManager is consuming 203% CPU with 24,000+ accumulated CPU hours. This indicates a memory leak, alert routing loop, or excessive alert volume. See Current Issues.
Immediate remediation:
kubectl rollout restart statefulset/alertmanager -n monitoring
Quick Commands
kubectl get pods -n monitoring -l app.kubernetes.io/name=alertmanager
kubectl top pod -n monitoring -l app.kubernetes.io/name=alertmanager
kubectl logs -n monitoring -l app.kubernetes.io/name=alertmanager --tail=100
TODO: expand with alert routing configuration, receiver setup, silence management, and integration with Slack (#ultrathink-agents channel).
Longhorn (Storage)
Longhorn provides distributed block storage for the K3s cluster, replicating data across all three nodes for redundancy.
Overview
| Property | Value |
|---|---|
| Namespace | longhorn-system |
| Type | Distributed block storage |
| Replication | Across megatron, thing1, thing2 |
| StorageClass | longhorn |
Features
- Automatic replication across nodes
- Snapshot and backup support
- Volume expansion
- Web UI for management
- CSI driver for Kubernetes PV provisioning
Quick Commands
kubectl get pods -n longhorn-system
kubectl get volumes.longhorn.io -n longhorn-system
kubectl get replicas.longhorn.io -n longhorn-system
TODO: expand with volume inventory, backup configuration, snapshot policies, and disaster recovery procedures.
Linkerd (Mesh)
Linkerd is a lightweight service mesh providing mutual TLS, traffic metrics, and reliability features for the K3s cluster.
Overview
| Property | Value |
|---|---|
| Namespace | linkerd |
| Age | 11 hours (recently deployed) |
| Type | Service mesh |
Features
- Automatic mutual TLS (mTLS) between meshed pods
- Per-route metrics and latency tracking
- Traffic splitting for canary deployments
- Retries and timeouts
Status
Linkerd was recently deployed/redeployed (11 hours old at audit time). Monitor for stability issues.
kubectl get pods -n linkerd
# If linkerd CLI is installed:
linkerd check
linkerd stat deployment -A
TODO: expand with injection status per namespace, traffic policies, and dashboard access.
MLflow
MLflow provides experiment tracking for ULTRATHINK research projects on the MEGATRON cluster.
Overview
| Property | Value |
|---|---|
| Namespace | ai-ml |
| Access | Internal (ClusterIP) |
| Purpose | ML experiment tracking, model registry, artifact storage |
Usage with ULTRATHINK
Each research project logs experiments to MLflow:
import mlflow
mlflow.set_tracking_uri("http://mlflow.ai-ml.svc.cluster.local:5000")
mlflow.set_experiment("rosa-vit")
with mlflow.start_run():
mlflow.log_param("learning_rate", 0.001)
mlflow.log_metric("accuracy", 0.95)
mlflow.log_artifact("model.pt")
kubectl get pods -n ai-ml -l app=mlflow
TODO: expand with experiment inventory, model registry contents, and artifact storage configuration.
Ollama
Ollama provides local LLM inference on the MEGATRON cluster, using GPU acceleration for fast generation.
Overview
| Property | Value |
|---|---|
| Namespaces | ai-ml, glamhub |
| Port | 11434 |
| GPU | RTX 3090 (GPU 0, ~2.7 GB VRAM at idle) |
Deployments
Ollama runs in two namespaces:
| Namespace | Purpose | Notes |
|---|---|---|
| ai-ml | General LLM inference for research | Cluster-wide access |
| glamhub | Content generation for GlamHub | N8N workflow integration |
Usage
# From within the cluster
curl http://ollama.ai-ml.svc.cluster.local:11434/api/generate \
-d '{"model": "llama3", "prompt": "Hello"}'
# List loaded models
curl http://ollama.ai-ml.svc.cluster.local:11434/api/tags
kubectl get pods -n ai-ml -l app=ollama
TODO: expand with model inventory, VRAM requirements per model, and performance benchmarks.
JupyterHub
JupyterHub provides multi-user Jupyter notebook server for interactive research on the MEGATRON cluster.
Overview
| Property | Value |
|---|---|
| Namespace | jupyterhub |
| Access | Internal (ClusterIP) |
| Purpose | Interactive notebooks for ULTRATHINK research |
Features
- Multi-user notebook environment
- GPU access for research notebooks
- Persistent storage per user
- Support for Python, R, and Julia kernels
kubectl get pods -n jupyterhub
TODO: expand with user management, GPU allocation, storage configuration, and custom image details.
OpenFaaS
OpenFaaS provides serverless function execution on the K3s cluster.
Overview
| Property | Value |
|---|---|
| Namespace | openfaas |
| Type | Serverless / FaaS platform |
Features
- Deploy functions as containers
- Auto-scaling based on demand
- Multiple language templates
- REST API for invocation
kubectl get pods -n openfaas
# If faas-cli installed:
faas-cli list
TODO: expand with deployed functions, scaling configuration, and integration points.
Argo Workflows
Argo Workflows provides Kubernetes-native workflow orchestration for data pipelines and ML workflows.
Overview
| Property | Value |
|---|---|
| Namespace | argo |
| Type | Workflow orchestration engine |
| Components | Workflow controller, server |
Use Cases
- ML training pipelines
- Data processing workflows
- CI/CD pipeline steps
- Batch job orchestration
kubectl get pods -n argo
# If argo CLI installed:
argo list -n argo
TODO: expand with workflow templates, cron workflows, artifact configuration, and integration with MLflow.
cert-manager
cert-manager automates TLS certificate provisioning and renewal in the K3s cluster.
Overview
| Property | Value |
|---|---|
| Namespace | cert-manager |
| Components | Controller, Webhook, CA Injector |
| Issuer | letsencrypt-prod (HTTP-01, BROKEN) |
Known Issue
The HTTP-01 ACME challenge solver does not work behind the Cloudflare tunnel. This is the root cause of multiple NOT READY certificates. See TLS Certificates and Certificate Renewal for the DNS-01 migration plan.
Components
| Pod | Restarts | Purpose |
|---|---|---|
| cert-manager | 24 | Main controller, watches Certificate resources |
| cert-manager-cainjector | 28 | Injects CA bundles into webhooks |
| cert-manager-webhook | 22 | Validates and mutates Certificate resources |
The high restart counts (22-28) are accumulated over 37 days of uptime.
Issuers
| Name | Type | Solver | Status |
|---|---|---|---|
| letsencrypt-prod | ClusterIssuer | HTTP-01 | Broken behind tunnel |
| letsencrypt-staging | ClusterIssuer | HTTP-01 | FALSE/Error |
Quick Commands
kubectl get pods -n cert-manager
kubectl get clusterissuer
kubectl get certificates -A
kubectl get challenges -A
kubectl logs -n cert-manager deployment/cert-manager --tail=100
TODO: expand with full issuer YAML, wildcard certificate setup, and DNS-01 configuration after migration.
Coolify
Coolify is a self-hosted PaaS (Platform as a Service) running as a Docker container on MEGATRON.
Overview
| Property | Value |
|---|---|
| Platform | Docker (not K3s) |
| URL | localhost:8000 |
| Image | ghcr.io/coollabsio/coolify |
| Status | Running (2 months) |
| Database | MariaDB 11 (port 3307) |
| Cache | Redis 7 Alpine (port 6380) |
Containers
| Container | Image | Port | Status |
|---|---|---|---|
| coolify | ghcr.io/coollabsio/coolify | 8000 | Running |
| mariadb | mariadb:11 | 3307 | Running |
| redis | redis:7-alpine | 6380 | Running |
Access
Coolify is available at http://localhost:8000 from MEGATRON.
docker ps --filter "name=coolify"
docker logs coolify --tail=50
TODO: expand with deployed applications, team configuration, and Git integration.
Docker Containers Overview
In addition to the K3s Kubernetes cluster, MEGATRON runs several workloads directly on Docker. These are services that either predate the K3s setup, require direct hardware access (GPU), or are managed by external tools (Coolify).
Docker vs K3s
| Aspect | Docker Containers | K3s Pods |
|---|---|---|
| Management | docker CLI, Docker Compose | kubectl, Helm, Kustomize |
| Networking | Docker bridge, port mapping | K3s CNI (Flannel), ClusterIP/NodePort |
| Storage | Docker volumes, bind mounts | PVCs, Longhorn, local-path |
| GPU Access | --gpus flag via NVIDIA runtime | GPU Operator, device plugin |
| Service Discovery | Manual / Docker DNS | CoreDNS, K8s services |
Container Groups
Bibliotheca Stack (7 containers)
Book management system with torrent client, VPN, TTS, and search. See Bibliotheca.
Coolify Stack (3 containers)
Self-hosted PaaS platform with MariaDB and Redis. See Coolify.
Meilisearch (1 container)
Full-text search engine used by Bibliotheca.
Quick Commands
# List all containers
docker ps -a
# List running containers with resource usage
docker stats --no-stream
# Check for problems
docker ps -a --filter "status=restarting"
docker ps -a --filter "status=exited"
# View Docker disk usage
docker system df
Container Inventory
Auto-generated: 2026-03-24 14:19:43 CDT
Running Containers
| Name | Image | Status | Ports | Created |
|---|---|---|---|---|
| bibliotheca-post-download | bibliotheca-post-download | Up 38 hours | 2026-03-23 00:40:05 -0500 CDT | |
| bibliotheca-torrent | qbittorrent:latest | Up 38 hours | 2026-03-23 00:24:56 -0500 CDT | |
| bibliotheca-vpn | gluetun | Up 38 hours (healthy) | 0.0.0.0:6881->6881/tcp, :::6881->6881/tcp, 8000/tcp, 8388/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:6881->6881/udp, :::8080->8080/tcp, :::6881->6881/udp, 8888/tcp, 8388/udp | 2026-03-23 00:24:56 -0500 CDT |
| bibliotheca-web | bibliotheca-web | Up 2 weeks | 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp | 2026-02-26 17:59:10 -0600 CST |
| bibliotheca-discovery | bibliotheca-discovery | Up 2 weeks | 2026-02-26 00:10:16 -0600 CST | |
| bibliotheca-deduplicator | bibliotheca-deduplicator | Up 2 weeks | 2026-02-25 22:46:40 -0600 CST | |
| bibliotheca-cover-scraper | bibliotheca-cover-scraper | Up 2 weeks | 2026-02-25 02:16:51 -0600 CST | |
| bibliotheca-tts | bibliotheca-tts | Up 2 weeks | 2026-02-25 01:54:22 -0600 CST | |
| bibliotheca-nginx | 04da2b0513cd | Up 2 weeks | 0.0.0.0:8088->80/tcp, :::8088->80/tcp | 2026-02-25 01:44:17 -0600 CST |
| bibliotheca-book-searcher | bibliotheca-book-searcher | Up 2 weeks | 2026-02-25 01:37:13 -0600 CST | |
| bibliotheca-categorizer | bibliotheca-categorizer | Restarting (0) 11 seconds ago | 2026-02-25 01:37:13 -0600 CST | |
| bibliotheca-converter | bibliotheca-converter | Up 2 weeks | 2026-02-23 02:37:36 -0600 CST | |
| bibliotheca-forgejo | forgejo:9 | Up 2 weeks | 0.0.0.0:2223->22/tcp, :::2223->22/tcp, 0.0.0.0:3003->3000/tcp, :::3003->3000/tcp | 2026-02-23 02:37:36 -0600 CST |
| bibliotheca-db | mariadb:11 | Up 2 weeks (healthy) | 0.0.0.0:3307->3306/tcp, :::3307->3306/tcp | 2026-02-21 02:21:29 -0600 CST |
| bibliotheca-redis | redis:7-alpine | Up 2 weeks (healthy) | 0.0.0.0:6380->6379/tcp, :::6380->6379/tcp | 2026-02-21 02:21:29 -0600 CST |
| bibliotheca-search | meilisearch:v1.6 | Up 2 weeks (healthy) | 0.0.0.0:7700->7700/tcp, :::7700->7700/tcp | 2026-02-21 02:21:29 -0600 CST |
| coolify | coolify:latest | Up 2 weeks (healthy) | 8443/tcp, 9000/tcp, 0.0.0.0:8000->8080/tcp, :::8000->8080/tcp | 2026-01-11 00:02:48 -0600 CST |
| coolify-realtime | coolify-realtime:1.0.10 | Up 2 weeks (healthy) | 0.0.0.0:6001-6002->6001-6002/tcp, :::6001-6002->6001-6002/tcp | 2026-01-11 00:02:47 -0600 CST |
| coolify-db | postgres:15-alpine | Up 2 weeks (healthy) | 5432/tcp | 2026-01-11 00:02:47 -0600 CST |
| coolify-redis | redis:7-alpine | Up 2 weeks (healthy) | 6379/tcp | 2026-01-11 00:02:47 -0600 CST |
| registry | registry:2 | Up 2 weeks | 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp | 2025-12-26 13:45:24 -0600 CST |
Stopped/Failed Containers
| Name | Image | Status | Created |
|---|---|---|---|
| bold_ramanujan | 0d36c4f63ab8 | Exited (1) 8 days ago | 2026-03-15 15:29:02 -0500 CDT |
| nifty_bassi | 1b323cd59d13 | Exited (1) 9 days ago | 2026-03-15 14:33:21 -0500 CDT |
| jovial_pasteur | e6ba6afac1eb | Exited (1) 9 days ago | 2026-03-15 12:01:47 -0500 CDT |
| determined_brahmagupta | e6ba6afac1eb | Exited (1) 9 days ago | 2026-03-15 11:36:01 -0500 CDT |
| clever_murdock | e6ba6afac1eb | Exited (1) 9 days ago | 2026-03-15 11:35:16 -0500 CDT |
| confident_euler | e6ba6afac1eb | Exited (1) 9 days ago | 2026-03-15 11:34:51 -0500 CDT |
| interesting_khorana | e6ba6afac1eb | Exited (1) 9 days ago | 2026-03-15 11:34:02 -0500 CDT |
| modest_brahmagupta | a01de93112bf | Exited (2) 2 weeks ago | 2026-03-03 21:29:52 -0600 CST |
| sleepy_lalande | 8be9aa337c0f | Exited (1) 2 weeks ago | 2026-03-03 21:19:15 -0600 CST |
| wizardly_beaver | 44a441a4a738 | Exited (1) 2 weeks ago | 2026-03-03 20:52:30 -0600 CST |
| romantic_booth | 8be9aa337c0f | Exited (1) 2 weeks ago | 2026-03-03 20:48:41 -0600 CST |
| elated_mahavira | 6a346f8027b4 | Exited (2) 2 weeks ago | 2026-03-03 18:57:02 -0600 CST |
| vigorous_lederberg | b42214b42b6f | Exited (2) 2 weeks ago | 2026-03-03 18:31:29 -0600 CST |
| nervous_shirley | 7238a16adb50 | Exited (2) 3 weeks ago | 2026-03-03 13:35:43 -0600 CST |
| confident_payne | 19007f18fa3d | Exited (2) 3 weeks ago | 2026-03-03 00:12:59 -0600 CST |
| serene_sinoussi | 5e003a2074e8 | Exited (2) 3 weeks ago | 2026-03-02 23:52:31 -0600 CST |
| cranky_sinoussi | 8467a0851c46 | Exited (2) 3 weeks ago | 2026-03-02 23:52:06 -0600 CST |
| goofy_mendeleev | e13443bb3d94 | Exited (2) 3 weeks ago | 2026-03-02 22:43:42 -0600 CST |
| pedantic_brattain | 87008d800559 | Exited (2) 3 weeks ago | 2026-03-02 22:43:17 -0600 CST |
| practical_euler | b1b75ed3fbe3 | Exited (2) 3 weeks ago | 2026-03-02 22:24:09 -0600 CST |
| quirky_margulis | 50f6b0e73078 | Exited (2) 3 weeks ago | 2026-03-02 22:23:42 -0600 CST |
| xenodochial_yalow | 6cc7ba33c25e | Exited (1) 3 weeks ago | 2026-03-01 11:18:25 -0600 CST |
| bibliotheca-worker | 5ef3e2ba0154 | Exited (1) 13 hours ago | 2026-02-26 00:09:21 -0600 CST |
| bibliotheca-cover-cache | bibliotheca-cover-cache | Exited (0) 13 hours ago | 2026-02-26 00:09:21 -0600 CST |
| bibliotheca-epub-covers | bibliotheca-epub-covers | Exited (0) 13 hours ago | 2026-02-25 23:42:34 -0600 CST |
| bibliotheca-enricher | bibliotheca-enricher | Exited (137) 3 weeks ago | 2026-02-25 01:33:06 -0600 CST |
| bibliotheca-covers | bibliotheca-cover-downloader | Exited (137) 3 weeks ago | 2026-02-25 01:33:06 -0600 CST |
| bibliotheca-indexer | a74599bec841 | Exited (0) 4 weeks ago | 2026-02-21 11:37:37 -0600 CST |
| ecstatic_moore | 9dd4f170174f | Exited (1) 2 months ago | 2025-12-25 19:04:47 -0600 CST |
| pedantic_benz | d8d8e4f1d64d | Exited (1) 2 months ago | 2025-12-25 18:59:12 -0600 CST |
| dazzling_albattani | d8d8e4f1d64d | Exited (1) 2 months ago | 2025-12-25 18:57:20 -0600 CST |
| frosty_mirzakhani | b3c88ff210fb | Exited (1) 2 months ago | 2025-12-25 18:55:02 -0600 CST |
| mystifying_ramanujan | 5f7dad7f926a | Exited (1) 2 months ago | 2025-12-25 18:52:42 -0600 CST |
Docker Networks
NETWORK ID NAME DRIVER SCOPE
27f8a63320e1 bibliotheca_default bridge local
6bfbd9cb7abd bridge bridge local
b661cb5621cd coolify bridge local
5f611afa1878 host host local
0c7471e13bbb none null local
Docker Volumes
DRIVER VOLUME NAME
local 7a5fe936b9a7dea50b570ed2d98e3aeb059d4a37e48a7f78ce6ecf7a2c003721
local 171145ba1b89149e3b254bb9480fb38a7de1135d9ee6c08689bd1c8542233b2c
local bibliotheca_converter_cache
local bibliotheca_db_data
local bibliotheca_forgejo_data
local bibliotheca_gluetun_data
local bibliotheca_redis_data
local bibliotheca_search_data
local bibliotheca_torrent_config
local coolify-db
local coolify-redis
Network Architecture
MEGATRON uses a layered networking architecture combining Cloudflare tunnels for public ingress, Tailscale for private mesh networking, and Traefik for Kubernetes-level routing.
Architecture Overview
┌─────────────────────────────────────────────────────────────────┐
│ INTERNET │
└──────────────────────────┬──────────────────────────────────────┘
│
v
┌─────────────────────────────────────────────────────────────────┐
│ CLOUDFLARE (DNS + WAF) │
│ │
│ Domains: stiq.us, corestation.io, idp.pro, │
│ kelseyfarmequipment.com, m3gatr0n.com │
│ │
│ Tunnel: 6d8885c4-97d9-43fd-8426-78a00c2834f1 │
│ Routes: 49 hostname-based rules │
│ Pattern: hostname -> https://localhost:32672 (noTLSVerify) │
└──────────────────────────┬──────────────────────────────────────┘
│
v
┌─────────────────────────────────────────────────────────────────┐
│ MEGATRON (Host) │
│ │
│ cloudflared ──────> localhost:32672 │
│ │ │
│ v │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Traefik Ingress Controller │ │
│ │ (kube-system, NodePort :32672) │ │
│ │ │ │
│ │ Host-based routing: │ │
│ │ *.stiq.us ──────────────> stiq / stiq-dev / stiq-staging │ │
│ │ *.corestation.io ───────> corestation / *-dev / *-staging │ │
│ │ *.idp.pro ──────────────> idp / idp-dev │ │
│ │ *.m3gatr0n.com ─────────> glamhub, auth, monitoring, etc │ │
│ │ kelseyfarmequipment.com > kelsey │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │ │
│ v │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ K3s Pod Network (ClusterIP services) │ │
│ │ Linkerd Service Mesh (mTLS) │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Tailscale Mesh (WireGuard) │ │
│ │ megatron: 100.70.25.47 │ │
│ │ mac-studio: 100.87.201.64 │ │
│ │ macbook-m4: 100.91.253.88 │ │
│ │ lambda: 100.108.49.109 │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Docker Bridge Network │ │
│ │ Bibliotheca containers, Coolify │ │
│ │ localhost:8080 (qBittorrent), :8088 (nginx), :8000 │ │
│ └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Port Map
External Ports (Internet-facing via Cloudflare)
All public traffic enters through the Cloudflare tunnel -- no ports are directly exposed to the internet.
Host Ports
| Port | Service | Protocol | Access |
|---|---|---|---|
| 22 | SSH (normal) | TCP | LAN / Tailscale |
| 2222 | SSH (rescue, high priority) | TCP | LAN / Tailscale |
| 2223 | Forgejo SSH (Git) | TCP | LAN / Tailscale |
| 6443 | K3s API server | TCP | LAN / Tailscale |
| 8000 | Coolify | TCP | localhost |
| 8080 | qBittorrent (Bibliotheca) | TCP | localhost |
| 8088 | Bibliotheca nginx | TCP | localhost |
| 7700 | Meilisearch | TCP | localhost |
| 11434 | Ollama | TCP | ClusterIP / localhost |
| 32672 | Traefik NodePort (HTTPS) | TCP | localhost (cloudflared) |
| 3307 | MariaDB (Coolify) | TCP | localhost |
| 6380 | Redis (Coolify) | TCP | localhost |
Kubernetes Service Ports (ClusterIP, internal only)
| Service | Port | Namespace |
|---|---|---|
| Traefik | 80, 443 | kube-system |
| CoreDNS | 53 | kube-system |
| Prometheus | 9090 | monitoring |
| Grafana | 3000 | monitoring |
| Loki | 3100 | monitoring |
| AlertManager | 9093 | monitoring |
| Vault | 8200 | vault |
| Harbor | 443 | registry |
Network Layers
Layer 1: Cloudflare (Public Ingress)
All public traffic flows through Cloudflare, which provides DNS, DDoS protection, WAF, and the tunnel endpoint. See Cloudflare Tunnels.
Layer 2: Traefik (Kubernetes Ingress)
Traefik receives tunnel traffic on NodePort 32672 and routes based on hostname to the appropriate Kubernetes service. See Traefik Ingress.
Layer 3: Linkerd (Service Mesh)
Linkerd provides mutual TLS between pods, traffic metrics, and reliability features. See Linkerd.
Layer 4: Tailscale (Private Mesh)
Tailscale connects MEGATRON to other machines (Mac Studio, MacBook, Lambda) via WireGuard-based mesh VPN. See Tailscale.
Layer 5: Docker Bridge (Container Networking)
Non-K3s containers (Bibliotheca, Coolify) use Docker bridge networking with port mappings to localhost.
DNS Flow
User browser
│
v
DNS query: app.stiq.us
│
v
Cloudflare DNS ──> resolves to Cloudflare edge
│
v
Cloudflare tunnel routes to MEGATRON
│
v
cloudflared ──> https://localhost:32672
│
v
Traefik matches Host header ──> routes to K3s service
│
v
K3s service ──> Pod (via kube-proxy/iptables)
Key Networking Issues
- cert-manager HTTP-01 broken -- Cannot complete ACME challenges behind Cloudflare tunnel. Must migrate to DNS-01 solver.
- Harbor TLS NOT READY (20 days) -- Certificate pending due to HTTP-01 failure.
- Devtron TLS NOT READY (20 days) -- Same root cause.
- Monitoring wildcard cert NOT READY -- Same root cause.
See TLS Certificates for full details.
Cloudflare Tunnels
Auto-generated: 2026-03-24 14:19:43 CDT
Tunnel Configuration
- Tunnel ID:
6d8885c4-97d9-43fd-8426-78a00c2834f1 - Config:
/etc/cloudflared/config.yml - Credentials:
/etc/cloudflared/6d8885c4-97d9-43fd-8426-78a00c2834f1.json - Service: cloudflared.service (systemd)
- Target: https://localhost:32672 (Traefik NodePort)
- Management:
mgt routeCLI at /home/lucas/paas/bin/
Traffic Flow
Internet → Cloudflare Edge → cloudflared tunnel → https://localhost:32672 → Traefik → k8s Service
Route Table
| # | Hostname | Target | Domain Group |
|---|---|---|---|
| 1 | dev-aegis.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 2 | aegis.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 3 | api.aegis.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 4 | vpn.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 5 | alertmanager.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 6 | auth.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 7 | dev.corestation.io | localhost:32672 | corestation.io |
| 8 | dev-api.corestation.io | localhost:32672 | corestation.io |
| 9 | corestation.io | localhost:32672 | corestation.io |
| 10 | api.corestation.io | localhost:32672 | corestation.io |
| 11 | app.corestation.io | localhost:32672 | corestation.io |
| 12 | admin.corestation.io | localhost:32672 | corestation.io |
| 13 | staging.corestation.io | localhost:32672 | corestation.io |
| 14 | staging-api.corestation.io | localhost:32672 | corestation.io |
| 15 | grafana.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 16 | dev.idp.pro | localhost:32672 | idp.pro |
| 17 | idp.pro | localhost:32672 | idp.pro |
| 18 | api.idp.pro | localhost:32672 | idp.pro |
| 19 | app.idp.pro | localhost:32672 | idp.pro |
| 20 | dev.kelseyfarmequipment.com | localhost:32672 | kelseyfarmequipment.com |
| 21 | kelseyfarmequipment.com | localhost:32672 | kelseyfarmequipment.com |
| 22 | www.kelseyfarmequipment.com | localhost:32672 | kelseyfarmequipment.com |
| 23 | api.kelseyfarmequipment.com | localhost:32672 | kelseyfarmequipment.com |
| 24 | s3.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 25 | minio.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 26 | platform.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 27 | prometheus.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 28 | registry.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 29 | dev.stiq.us | localhost:32672 | stiq.us |
| 30 | dev-api.stiq.us | localhost:32672 | stiq.us |
| 31 | dev-app.stiq.us | localhost:32672 | stiq.us |
| 32 | dev-admin.stiq.us | localhost:32672 | stiq.us |
| 33 | grafana.stiq.us | localhost:32672 | stiq.us |
| 34 | stiq.us | localhost:32672 | stiq.us |
| 35 | api.stiq.us | localhost:32672 | stiq.us |
| 36 | app.stiq.us | localhost:32672 | stiq.us |
| 37 | admin.stiq.us | localhost:32672 | stiq.us |
| 38 | staging.stiq.us | localhost:32672 | stiq.us |
| 39 | staging-api.stiq.us | localhost:32672 | stiq.us |
| 40 | staging-app.stiq.us | localhost:32672 | stiq.us |
| 41 | staging-admin.stiq.us | localhost:32672 | stiq.us |
| 42 | glamhub.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 43 | admin-glamhub.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 44 | cms-glamhub.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 45 | n8n-glamhub.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 46 | docs.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 47 | wiki.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
| 48 | git.m3gatr0n.com | localhost:32672 | m3gatr0n.com |
Routes by Domain
m3gatr0n.com
dev-aegis.m3gatr0n.comaegis.m3gatr0n.comapi.aegis.m3gatr0n.comvpn.m3gatr0n.comalertmanager.m3gatr0n.comauth.m3gatr0n.comgrafana.m3gatr0n.coms3.m3gatr0n.comminio.m3gatr0n.complatform.m3gatr0n.comprometheus.m3gatr0n.comregistry.m3gatr0n.comglamhub.m3gatr0n.comadmin-glamhub.m3gatr0n.comcms-glamhub.m3gatr0n.comn8n-glamhub.m3gatr0n.comdocs.m3gatr0n.comwiki.m3gatr0n.comgit.m3gatr0n.com
stiq.us
dev.stiq.usdev-api.stiq.usdev-app.stiq.usdev-admin.stiq.usgrafana.stiq.usapi.stiq.usapp.stiq.usadmin.stiq.usstaging.stiq.usstaging-api.stiq.usstaging-app.stiq.usstaging-admin.stiq.us
corestation.io
dev.corestation.iodev-api.corestation.ioapi.corestation.ioapp.corestation.ioadmin.corestation.iostaging.corestation.iostaging-api.corestation.io
idp.pro
dev.idp.proapi.idp.proapp.idp.pro
kelseyfarmequipment.com
dev.kelseyfarmequipment.comwww.kelseyfarmequipment.comapi.kelseyfarmequipment.com
Catch-All Rule
Unmatched requests return HTTP 404.
Tailscale
Tailscale provides a WireGuard-based mesh VPN connecting MEGATRON to other machines in the network. It enables secure, direct SSH access and inter-machine communication without exposing ports to the internet.
Tailscale Mesh
| Machine | Hostname | Tailscale IP | Role | Hardware |
|---|---|---|---|---|
| MEGATRON | megatron | 100.70.25.47 | Primary server, K3s control plane | Threadripper 3990X, 251GB, 2x RTX 3090 |
| Mac Studio | lucass-mac-studio | 100.87.201.64 | Inference, visualization, large models | M2 Ultra, 512GB unified, 7.3TB |
| MacBook M4 | macbook-pro-m4 | 100.91.253.88 | Development, quick tests | M4 Max, 64GB |
| Lambda Laptop | tensorbook | 100.108.49.109 | Ablations, single-GPU experiments | 1x RTX GPU, 64GB |
Network Diagram
┌─────────────────────┐
│ Tailscale │
│ Coordination │
│ Server │
└─────────┬───────────┘
│ (control plane only,
│ data flows peer-to-peer)
┌────────────────────┼────────────────────┐
│ │ │
v v v
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ MEGATRON │ │ Mac Studio │ │ MacBook M4 │
│ 100.70.25.47 │ │ 100.87.201.64 │ │ 100.91.253.88 │
│ │ │ │ │ │
│ K3s cluster │<────────────────>│ Development │
│ GPU training │ │ Inference │ │ Quick tests │
│ Prod hosting │ │ Visualization │ │ │
└────────┬────────┘ │ Large models │ └─────────────────┘
│ └─────────────────┘
│
v
┌─────────────────┐
│ Lambda Laptop │
│ 100.108.49.109 │
│ │
│ Ablations │
│ Single-GPU │
└─────────────────┘
SSH via Tailscale
SSH config entries for Tailscale-based access (from ~/.ssh/config):
| SSH Alias | Target | IP | Notes |
|---|---|---|---|
| mac-studio | Mac Studio M2 Ultra | 100.87.201.64 | Also available as mac-studio-local (10.0.0.71 LAN) |
| macbook-m4 | MacBook M4 Max | 100.91.253.88 | |
| tensorbook | Lambda Laptop | 100.108.49.109 | |
| megatron-rescue | MEGATRON rescue SSH | localhost:2222 | High-priority access |
# SSH to Mac Studio via Tailscale
ssh mac-studio
# SSH to MacBook
ssh macbook-m4
# SSH to Lambda
ssh tensorbook
Use Cases
Research Workload Distribution
| Machine | Use For |
|---|---|
| MEGATRON | Full training runs, distributed (multi-GPU) experiments |
| Mac Studio | Inference, visualization, loading large models (512GB memory) |
| MacBook M4 | Development, quick iteration, code editing |
| Lambda | Single-GPU ablations, smaller experiments |
Data Transfer
# Copy dataset from MEGATRON to Mac Studio
scp -r /mnt/shared/datasets/cifar10 mac-studio:~/datasets/
# Rsync checkpoints
rsync -avz /mnt/shared/checkpoints/rosa/ mac-studio:~/checkpoints/rosa/
# Copy results back
scp mac-studio:~/results/inference.json /mnt/shared/results/
Tailscale Management
# Check Tailscale status
tailscale status
# Check connection to a specific peer
tailscale ping mac-studio
# View Tailscale IP
tailscale ip
# Check network diagnostics
tailscale netcheck
# Enable/disable Tailscale
sudo tailscale up
sudo tailscale down
Tailscale on K3s
Tailscale runs as a system service (tailscaled.service) and provides an overlay network independent of the K3s cluster network. Pods within K3s do not use Tailscale directly -- Tailscale is used for machine-to-machine communication and SSH access.
Traefik Ingress
Traefik is the default ingress controller for K3s, handling all HTTP/HTTPS traffic routing to Kubernetes services.
Overview
| Property | Value |
|---|---|
| Namespace | kube-system |
| Version | Bundled with K3s v1.33.6 |
| NodePort | 32672 (HTTPS) |
| Type | Ingress controller |
How Traffic Reaches Traefik
cloudflared (Cloudflare tunnel)
|
v
https://localhost:32672 (noTLSVerify)
|
v
Traefik (kube-system)
|
v
IngressRoute rules match Host header
|
v
Backend K8s Service -> Pod
Routing
Traefik uses IngressRoute CRDs (Traefik's native routing) for hostname-based routing. Each application defines its own IngressRoute in its namespace.
# List all IngressRoutes
kubectl get ingressroute -A
# Describe a specific route
kubectl describe ingressroute <name> -n <namespace>
# Check Traefik pods
kubectl get pods -n kube-system -l app.kubernetes.io/name=traefik
# Traefik dashboard (if enabled)
kubectl port-forward -n kube-system svc/traefik-dashboard 9000:9000
TODO: expand with middleware configuration, rate limiting, TLS configuration, and dashboard access.
DNS & Domains
All external domains are managed through Cloudflare DNS, with traffic routed through the Cloudflare tunnel.
Domain Inventory
| Domain | Registrar | DNS Provider | Purpose |
|---|---|---|---|
| m3gatr0n.com | - | Cloudflare | Infrastructure services |
| stiq.us | - | Cloudflare | STIQ SaaS platform |
| corestation.io | - | Cloudflare | CoreStation fire dept SaaS |
| idp.pro | - | Cloudflare | IDP identity platform |
| kelseyfarmequipment.com | - | Cloudflare | Kelsey e-commerce |
Subdomain Usage
m3gatr0n.com (Infrastructure)
| Subdomain | Service |
|---|---|
| auth | Authentik SSO |
| aegis | Aegis VPN |
| api.aegis | Aegis API |
| dev-aegis | Aegis dev |
| vpn | VPN endpoint |
| glamhub | GlamHub frontend |
| admin-glamhub | GlamHub Directus |
| cms-glamhub | GlamHub CMS API |
| n8n-glamhub | GlamHub N8N |
| registry | Harbor container registry |
| platform | Devtron CI/CD |
| grafana | Grafana dashboards |
| prometheus | Prometheus metrics |
| alertmanager | AlertManager UI |
| s3 | MinIO S3 API |
| minio | MinIO console |
| docs | Documentation |
| wiki | Wiki.js |
| git | Forgejo |
Internal DNS
Kubernetes internal DNS is handled by CoreDNS in the kube-system (or dns) namespace. Services are reachable at:
<service>.<namespace>.svc.cluster.local
TODO: expand with DNS record details, TTL settings, and external-dns configuration.
TLS Certificates
TLS certificates are managed by cert-manager in the Kubernetes cluster. There are currently several certificates in a broken state due to the HTTP-01 challenge solver being incompatible with the Cloudflare tunnel architecture.
Certificate Inventory
| Certificate | Namespace | Issuer | Status | Age | Notes |
|---|---|---|---|---|---|
| kuber-ca | default | Self-signed | Ready | - | Internal CA |
| traefik-dashboard-tls | kube-system | letsencrypt-prod | Ready | - | Traefik admin |
| wildcard-sslip | default | letsencrypt-prod | Ready | - | sslip.io wildcard |
| harbor-tls | registry | letsencrypt-prod | NOT READY | 20 days | HTTP-01 failure |
| devtron-tls | devtroncd | letsencrypt-prod | NOT READY | 20 days | HTTP-01 failure |
| wildcard-sslip-tls | monitoring | letsencrypt-prod | NOT READY | - | HTTP-01 failure |
Issuers
| Issuer | Type | Status | Notes |
|---|---|---|---|
| letsencrypt-prod | ClusterIssuer, ACME HTTP-01 | Active | BROKEN behind tunnel |
| letsencrypt-staging | ClusterIssuer, ACME HTTP-01 | FALSE | Staging issuer in error state |
The HTTP-01 Problem
The current cert-manager configuration uses HTTP-01 ACME challenges. This solver requires Let's Encrypt to make an HTTP request to http://<domain>/.well-known/acme-challenge/<token> to verify domain ownership.
This does not work behind a Cloudflare tunnel because:
Let's Encrypt ──> Cloudflare ──> tunnel ──> Traefik ──> cert-manager solver pod
│
└── Cloudflare may cache, redirect to HTTPS,
or otherwise interfere with the challenge
The Cloudflare tunnel and its "Always Use HTTPS" setting redirects HTTP challenges to HTTPS, causing validation to fail.
Required Fix: DNS-01 Solver
The solution is to migrate from HTTP-01 to DNS-01 challenge solver. DNS-01 verifies domain ownership by creating a TXT record in DNS, which works regardless of tunnel configuration.
Migration Steps
- Create a Cloudflare API token with DNS edit permissions
- Store the token as a Kubernetes secret
- Update the ClusterIssuer to use DNS-01 with Cloudflare
- Re-request failed certificates
See Certificate Renewal Runbook for the full procedure.
Target Configuration
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-prod-key
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
name: cloudflare-api-token
key: api-token
Affected Services
The following services have broken TLS due to the HTTP-01 issue:
| Service | Certificate | Impact |
|---|---|---|
| Harbor | harbor-tls | Registry unreachable via HTTPS from external |
| Devtron | devtron-tls | CI/CD dashboard TLS broken |
| Monitoring | wildcard-sslip-tls | Monitoring dashboards may show cert warnings |
Working Certificates
These certificates were issued before the problem manifested or use a different mechanism:
| Certificate | Why It Works |
|---|---|
| kuber-ca | Self-signed, no ACME needed |
| traefik-dashboard-tls | Issued when HTTP-01 was working, auto-renewed before expiry |
| wildcard-sslip | sslip.io domain may resolve differently |
Quick Commands
# List all certificates
kubectl get certificates -A
# Check certificate details
kubectl describe certificate harbor-tls -n registry
# Check cert-manager logs
kubectl logs -n cert-manager -l app=cert-manager --tail=100
# Check issuer status
kubectl get clusterissuer
# Force certificate re-request (delete and recreate)
kubectl delete certificate harbor-tls -n registry
# Then re-apply the Certificate resource
# Check ACME challenge status
kubectl get challenges -A
kubectl describe challenge -A
IaC Overview
MEGATRON's infrastructure is managed through a combination of Infrastructure as Code tools: Terraform for cloud resources, Helm for Kubernetes package management, Kustomize for environment-specific overlays, and Docker Compose for non-K3s workloads.
Tool Inventory
| Tool | Purpose | Locations |
|---|---|---|
| Terraform | Cloud provider infrastructure (AWS, Azure, GCP, DO, Hetzner, Vultr, Oracle) | /home/lucas/vpn/infrastructure/terraform/ |
| Helm | Kubernetes application packaging and deployment | Multiple chart directories |
| Kustomize | Environment-specific K8s manifest overlays | Multiple overlay directories |
| Docker Compose | Multi-container local workloads | /home/lucas/ultrathink-infra/, /home/lucas/bibliotheca/, etc. |
Coverage Map
┌─────────────────────────────────────────────────────────┐
│ IaC Coverage │
│ │
│ ┌──────────────────────┐ ┌─────────────────────────┐ │
│ │ TERRAFORM │ │ HELM │ │
│ │ │ │ │ │
│ │ Aegis VPN infra: │ │ IDP platform: │ │
│ │ - AWS │ │ - core-platform │ │
│ │ - Azure │ │ - argocd │ │
│ │ - GCP │ │ - external-dns │ │
│ │ - DigitalOcean │ │ - cnpg │ │
│ │ - Hetzner │ │ - weaviate │ │
│ │ - Vultr │ │ - grafana │ │
│ │ - Oracle │ │ │ │
│ └──────────────────────┘ │ Aegis VPN: │ │
│ │ - aegis chart │ │
│ ┌──────────────────────┐ │ │ │
│ │ KUSTOMIZE │ │ Kelsey Equipment: │ │
│ │ │ │ - irrigation-parts │ │
│ │ CoreStation: │ └─────────────────────────┘ │
│ │ - dev overlay │ │
│ │ - prod overlay │ ┌─────────────────────────┐ │
│ │ │ │ DOCKER COMPOSE │ │
│ │ Aegis VPN: │ │ │ │
│ │ - base │ │ ULTRATHINK infra: │ │
│ │ - megatron overlay │ │ - JupyterLab │ │
│ │ - dev overlay │ │ - MLflow │ │
│ │ - prod overlay │ │ - TensorBoard │ │
│ │ │ │ │ │
│ │ Kelsey Equipment: │ │ Bibliotheca stack │ │
│ │ - demo │ │ Gene editing env │ │
│ │ - dev │ └─────────────────────────┘ │
│ │ - qa │ │
│ │ - prod │ │
│ └──────────────────────┘ │
└─────────────────────────────────────────────────────────┘
Coverage Gaps
Several deployed services lack IaC definitions and were likely deployed via manual kubectl apply or UI-based tools:
| Service | Current State | Recommended IaC |
|---|---|---|
| Authentik | Manual / unknown | Helm chart |
| Vault | Manual / unknown | Helm chart |
| Harbor | Manual / unknown | Helm chart |
| Monitoring stack | Manual / unknown | Helm (kube-prometheus-stack) |
| Longhorn | Manual / unknown | Helm chart |
| Linkerd | Manual / unknown | Helm chart |
| STIQ | Unknown | Kustomize or Helm |
| GlamHub | Unknown | Kustomize or Helm |
Links
- Terraform -- Cloud infrastructure definitions
- Helm Charts -- Kubernetes package management
- Kustomize -- Environment overlay system
- Docker Compose Files -- Local container orchestration
Terraform
Terraform manages cloud infrastructure for the Aegis VPN service, provisioning VPN endpoints across seven cloud providers.
Location
/home/lucas/vpn/infrastructure/terraform/
Provider Inventory
| Provider | Directory | Purpose |
|---|---|---|
| AWS | terraform/aws/ | VPN endpoints on Amazon Web Services |
| Azure | terraform/azure/ | VPN endpoints on Microsoft Azure |
| GCP | terraform/gcp/ | VPN endpoints on Google Cloud Platform |
| DigitalOcean | terraform/do/ | VPN endpoints on DigitalOcean |
| Hetzner | terraform/hetzner/ | VPN endpoints on Hetzner Cloud |
| Vultr | terraform/vultr/ | VPN endpoints on Vultr |
| Oracle Cloud | terraform/oracle/ | VPN endpoints on Oracle Cloud |
Usage
cd /home/lucas/vpn/infrastructure/terraform/<provider>/
# Initialize
terraform init
# Plan changes
terraform plan
# Apply changes
terraform apply
# Destroy resources
terraform destroy
TODO: expand with state backend configuration, variable definitions, module structure, and cost estimates per provider.
Helm Charts
Helm charts are used for deploying complex Kubernetes applications with templated manifests and configurable values.
Chart Inventory
IDP Platform Charts
Location: /home/lucas/idp/infra/charts/
| Chart | Purpose | Key Components |
|---|---|---|
| core-platform | IDP application stack | API, frontend, workers |
| argocd | GitOps CD for IDP | ArgoCD server, repo server, controller |
| external-dns | Automatic DNS record management | Syncs K8s ingress to DNS provider |
| cnpg | CloudNativePG (PostgreSQL operator) | Database clusters, backups, replication |
| weaviate | Vector database | Vector search engine for IDP |
| grafana | Monitoring dashboards | Grafana with IDP-specific dashboards |
Aegis VPN Chart
Location: /home/lucas/vpn/charts/aegis/
| Chart | Purpose | Key Components |
|---|---|---|
| aegis | VPN service deployment | VPN server, API, management UI |
Kelsey Farm Equipment Chart
Location: /home/lucas/irrigation-parts/deploy/helm/
| Chart | Purpose | Key Components |
|---|---|---|
| irrigation-parts | E-commerce application | Frontend, API, database |
Usage
# Install a chart
helm install <release-name> <chart-path> -n <namespace> -f values.yaml
# Upgrade a release
helm upgrade <release-name> <chart-path> -n <namespace> -f values.yaml
# List releases
helm list -A
# Check release status
helm status <release-name> -n <namespace>
# View rendered templates (dry run)
helm template <release-name> <chart-path> -f values.yaml
# Rollback to previous revision
helm rollback <release-name> <revision> -n <namespace>
Values Files
Each chart uses values files for environment-specific configuration:
charts/core-platform/
├── Chart.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ └── ...
├── values.yaml # Default values
├── values-dev.yaml # Development overrides
├── values-staging.yaml # Staging overrides
└── values-prod.yaml # Production overrides
Deploy with environment-specific values:
# Development
helm upgrade --install idp-dev ./charts/core-platform \
-n idp-dev -f values.yaml -f values-dev.yaml
# Production
helm upgrade --install idp ./charts/core-platform \
-n idp -f values.yaml -f values-prod.yaml
Third-Party Helm Charts
In addition to custom charts, several third-party Helm charts are likely in use for infrastructure services (installed via helm install or ArgoCD):
| Chart | Repository | Namespace | Notes |
|---|---|---|---|
| authentik | goauthentik/authentik | authentik | SSO provider |
| vault | hashicorp/vault | vault | Secrets management |
| harbor | goharbor/harbor | registry | Container registry |
| longhorn | longhornio/longhorn | longhorn-system | Distributed storage |
| linkerd | linkerd/linkerd2 | linkerd | Service mesh |
| cert-manager | jetstack/cert-manager | cert-manager | TLS automation |
| prometheus-stack | prometheus-community/kube-prometheus-stack | monitoring | Full observability |
Note: Verify actual installations with
helm list -A. The above are inferred from deployed services.
Kustomize
Kustomize provides environment-specific Kubernetes manifest overlays without modifying base resources.
Projects Using Kustomize
CoreStation (Fire Department SaaS)
/home/lucas/fire-department-saas/deploy/k8s/
├── base/ # Base manifests (deployments, services, configmaps)
├── overlays/
│ ├── dev/ # Development environment overrides
│ └── prod/ # Production environment overrides
# Deploy to dev
kubectl apply -k /home/lucas/fire-department-saas/deploy/k8s/overlays/dev/
# Deploy to prod
kubectl apply -k /home/lucas/fire-department-saas/deploy/k8s/overlays/prod/
Aegis VPN
/home/lucas/vpn/k8s/
├── base/ # Base VPN manifests
├── overlays/
│ ├── megatron/ # MEGATRON-specific config
│ ├── dev/ # Development overrides
│ └── prod/ # Production overrides
Kelsey Farm Equipment
/home/lucas/irrigation-parts/deploy/k8s/
├── base/
├── overlays/
│ ├── demo/ # Demo environment
│ ├── dev/ # Development
│ ├── qa/ # QA testing
│ └── prod/ # Production
Usage
# Preview rendered manifests
kubectl kustomize overlays/dev/
# Apply an overlay
kubectl apply -k overlays/dev/
# Diff against live state
kubectl diff -k overlays/prod/
TODO: expand with common patches, strategic merge patches, and shared component references.
Docker Compose Files
Docker Compose is used for multi-container workloads that run outside the K3s cluster.
Compose Files
ULTRATHINK Research Infrastructure
Location: /home/lucas/ultrathink-infra/docker-compose.yml
| Service | Purpose |
|---|---|
| JupyterLab | Interactive notebook environment |
| MLflow | Experiment tracking server |
| TensorBoard | Training visualization |
Bibliotheca (Book Management)
Location: /home/lucas/bibliotheca/
Full book management stack with 15+ containers. See Bibliotheca and Container Inventory.
Gene Editing Environment
Location: /home/lucas/gene-editing/docker-compose.yml
Development environment for gene editing research tools.
Usage
# Start a stack
cd /path/to/project && docker compose up -d
# View running services
docker compose ps
# View logs
docker compose logs -f
# Stop a stack
docker compose down
# Rebuild and restart
docker compose up -d --build
TODO: expand with environment variable configuration, volume mounts, and network settings per compose file.
SSH Configuration
MEGATRON provides multiple SSH access methods for different use cases: normal SSH, rescue SSH for emergencies, and Forgejo SSH for Git operations.
SSH Daemons
| Port | Service | Purpose | Priority |
|---|---|---|---|
| 22 | sshd | Normal SSH access | Normal |
| 2222 | sshd-rescue | Emergency high-priority SSH | Nice -20, OOM protected |
| 2223 | Forgejo SSH | Git SSH operations | Normal |
SSH Host Configuration
The following entries are configured in ~/.ssh/config:
| Host Alias | Machine | IP / Host | Port | Notes |
|---|---|---|---|---|
| mac-studio | Mac Studio M2 Ultra | 100.87.201.64 (Tailscale) | 22 | Primary Mac Studio access |
| mac-studio-local | Mac Studio M2 Ultra | 10.0.0.71 (LAN) | 22 | LAN-only access |
| macbook-m4 | MacBook M4 Max | 100.91.253.88 (Tailscale) | 22 | Development machine |
| tensorbook | Lambda Laptop | 100.108.49.109 (Tailscale) | 22 | GPU experiments |
| megatron-rescue | MEGATRON | localhost | 2222 | Emergency access |
Connecting to MEGATRON
From Local Network
# Normal SSH
ssh lucas@megatron
# Or by IP
ssh [email protected]
Via Tailscale (from any machine in the mesh)
ssh [email protected]
Rescue SSH (Emergency)
# From local
ssh -p 2222 lucas@localhost
# Using SSH config alias
ssh megatron-rescue
# From Mac Studio
ssh -p 2222 [email protected]
To Other Machines
# Mac Studio
ssh mac-studio
# MacBook M4
ssh macbook-m4
# Lambda Laptop
ssh tensorbook
Rescue SSH Details
The rescue SSH daemon provides guaranteed access even when the system is under extreme load:
| Property | Value |
|---|---|
| Port | 2222 |
| Config | /etc/ssh/sshd_config_rescue |
| Service | sshd-rescue.service |
| Nice | -20 (highest priority) |
| OOM | Protected (OOMScoreAdjust=-1000) |
| I/O | Realtime scheduling |
This is critical for recovery scenarios where the main SSH daemon is unresponsive due to:
- High CPU load (e.g., runaway processes)
- Memory exhaustion (OOM conditions)
- Disk I/O saturation
- Kubernetes pod storms
See Rescue SSH for full details.
Forgejo SSH (Port 2223)
Port 2223 is used by Forgejo (self-hosted Git) for SSH-based Git operations:
# Clone a repo via Forgejo SSH
git clone ssh://git@megatron:2223/user/repo.git
SSH Key Management
# List authorized keys
cat ~/.ssh/authorized_keys
# Add a new key
echo "ssh-ed25519 AAAA... user@machine" >> ~/.ssh/authorized_keys
# Test connection
ssh -T git@megatron -p 2223
Kubernetes Access via SSH
After SSH-ing to MEGATRON, kubectl is available for cluster management:
# SSH to MEGATRON, then use kubectl
ssh [email protected]
kubectl get nodes
kubectl get pods -A
For remote kubectl access without SSH, see Kubeconfig.
Security Notes
- Password authentication should be disabled; use key-based auth only
- Root login should be disabled
- The rescue SSH daemon uses the same authentication as the primary daemon
- Forgejo SSH runs as a separate user/process for Git operations
- Tailscale provides an encrypted tunnel; SSH over Tailscale is double-encrypted
Rescue SSH (Port 2222)
The rescue SSH daemon provides guaranteed emergency access to MEGATRON even under extreme system load, OOM conditions, or process storms.
Configuration
| Property | Value |
|---|---|
| Port | 2222 |
| Config File | /etc/ssh/sshd_config_rescue |
| Service | sshd-rescue.service (systemd) |
| Nice | -20 (highest CPU priority) |
| OOM Score | -1000 (OOM kill protected) |
| I/O Scheduling | Realtime |
When to Use
Use rescue SSH when:
- Normal SSH (port 22) is unresponsive
- System is under extreme CPU load
- OOM killer is active
- K3s pod storms are consuming resources
- You need guaranteed access for emergency maintenance
Connecting
# From local machine
ssh -p 2222 lucas@megatron
# Using SSH config alias
ssh megatron-rescue
# From Mac Studio via Tailscale
ssh -p 2222 [email protected]
Service Management
# Check rescue SSH status
sudo systemctl status sshd-rescue
# Restart rescue SSH
sudo systemctl restart sshd-rescue
# View rescue SSH config
cat /etc/ssh/sshd_config_rescue
How It Works
The rescue SSH daemon runs as a separate sshd process with elevated scheduling priority:
- Nice -20 ensures it gets CPU time before any normal process
- OOMScoreAdjust=-1000 prevents the OOM killer from targeting it
- Realtime I/O scheduling ensures disk access even under I/O saturation
- Separate port (2222) avoids contention with the primary sshd on port 22
Tailscale Machines
All machines in the Tailscale mesh network. See also Tailscale Networking.
Machine Inventory
| Machine | Hostname | Tailscale IP | Hardware | Role |
|---|---|---|---|---|
| MEGATRON | megatron | 100.70.25.47 | Threadripper 3990X, 251GB, 2x RTX 3090 | Primary server |
| Mac Studio | lucass-mac-studio | 100.87.201.64 | M2 Ultra, 512GB unified, 7.3TB | Inference, visualization |
| MacBook M4 | macbook-pro-m4 | 100.91.253.88 | M4 Max, 64GB | Development |
| Lambda Laptop | tensorbook | 100.108.49.109 | RTX GPU, 64GB | GPU experiments |
Connectivity Check
tailscale status
tailscale ping mac-studio
tailscale ping macbook-m4
tailscale ping tensorbook
Kubeconfig
Kubeconfig provides remote kubectl access to the K3s cluster without SSH-ing to MEGATRON.
Default Location
On MEGATRON, the kubeconfig is automatically available:
# K3s stores it at:
/etc/rancher/k3s/k3s.yaml
# Usually symlinked or copied to:
~/.kube/config
Remote Access
To use kubectl from another machine (e.g., MacBook M4):
- Copy the kubeconfig from MEGATRON:
scp megatron:/etc/rancher/k3s/k3s.yaml ~/.kube/megatron-config
- Update the server address to the Tailscale IP:
sed -i 's/127.0.0.1/100.70.25.47/' ~/.kube/megatron-config
- Use it:
export KUBECONFIG=~/.kube/megatron-config
kubectl get nodes
K3s API Server
| Property | Value |
|---|---|
| Port | 6443 |
| Address | 100.70.25.47:6443 (via Tailscale) |
| Auth | Client certificate (from kubeconfig) |
TODO: expand with multi-context setup, RBAC configuration, and service account tokens.
Research Overview (ULTRATHINK)
MEGATRON hosts the ULTRATHINK research system -- a large-scale collection of spiking neural network (SNN) and efficient attention research papers, each with its own codebase, experiments, and dedicated Claude Code agent.
Summary
| Metric | Value |
|---|---|
| Total Projects | 129+ |
| Waves | 8 |
| Storage | 234 GB (~/Papers/) |
| Projects with CLAUDE.md | 112 |
| Projects with Code | 16 |
| Compute | 2x RTX 3090 (48 GB VRAM total) |
| Agent System | Claude Code with per-project specialist agents |
| Experiment Tracking | MLflow |
| Notebooks | JupyterHub |
Project Waves
| Wave | Papers | Directory Range | Theme |
|---|---|---|---|
| Core | 6 | paper/, paper3/, paper4/, paper6/, paper7/, paper8/ | Original SNN research |
| Extended (paper10-25) | 16 | paper10-25 | ROSA extensions and variants |
| Wave 2 | 10 | paper26-35 | Extended SNN architectures |
| Wave 3 | 10 | paper36-45 | Advanced SNN applications |
| Wave 4 | 15 | paper46-60 | Real-time audio/signal processing |
| Wave 5 | 20 | paper61-80 | Thorpe TB trillion-neuron architecture |
| Wave 6 | 15 | paper81-95 | Differentiable tree machines + SNN |
| Wave 7 | 15 | paper96-110 | DeepSeek R2/RNN + SNN integration |
| Wave 8 | 20 | paper111-130 | Domain-specific applications |
Core Projects (Original)
| Project | Directory | Purpose | Status |
|---|---|---|---|
| ROSA ViT | Papers/paper/ | Rank-Order Spiking Attention for vision transformers | Reviewed |
| Grandmother | Papers/paper3/ | Invertible Rank-Order Autoencoder | Reviewed, has code |
| SpikeGPT | Papers/paper4/ | O(N) Attention via Spike Timing for language | Reviewed |
| Memory Engine | Papers/paper6/ | Hebbian Memory for Continual Learning | Reviewed |
| Imagination | Papers/paper7/ | SNN-based Video Generation | Reviewed |
| Audio Engine | Papers/paper8/ | SNN Audio Processing | Reviewed |
Wave 2: Extended Architectures (paper26-35)
| Project | Directory | Purpose | Has Code |
|---|---|---|---|
| SpikeMoE | Papers/paper26/ | Mixture of Experts with Spike-Gated Routing | Yes |
| NeuroMamba | Papers/paper27/ | State Space Models with Spiking Dynamics | Yes |
| TempoBERT | Papers/paper28/ | Temporal Coding for Language Understanding | No |
| SpikeFlow | Papers/paper29/ | Normalizing Flows with Neuromorphic Primitives | No |
| ROSA-3D | Papers/paper30/ | Rank-Order Attention for Point Clouds | No |
| SpikeDreamer | Papers/paper31/ | World Models with Spiking Inference | No |
| NeuroRetrieval | Papers/paper32/ | Spike-Based Dense Retrieval | No |
| EventNeRF | Papers/paper33/ | Neural Radiance Fields from Event Cameras | Yes |
| SpikeCodec | Papers/paper34/ | Neuromorphic Video Compression | No |
| NeuroNav | Papers/paper35/ | Spiking Networks for Robot Navigation | Yes |
Wave 3: Advanced Applications (paper36-45)
| Project | Directory | Purpose | Has Code |
|---|---|---|---|
| SpikeSSL | Papers/paper36/ | Self-Supervised Learning via Spike Timing | No |
| NeuroGAN | Papers/paper37/ | Spiking Generative Adversarial Networks | Yes |
| SpikeDiff | Papers/paper38/ | Diffusion Models with Neuromorphic Dynamics | No |
| TempoGraph | Papers/paper39/ | Temporal Graph Networks with Spike Communication | Yes |
| SpikeRAG | Papers/paper40/ | Retrieval-Augmented Generation with Spike Memory | Yes |
| NeuroSAT | Papers/paper41/ | Boolean Satisfiability via Spiking Networks | Yes |
| SpikeCLIP | Papers/paper42/ | Contrastive Vision-Language with Spike Alignment | Yes |
| TempoRL | Papers/paper43/ | Reinforcement Learning with Spike-Time Rewards | No |
| NeuroCast | Papers/paper44/ | Time Series Forecasting with Spiking Reservoirs | No |
| SpikeKAN | Papers/paper45/ | Kolmogorov-Arnold Networks with Spike Functions | Yes |
Later Waves (4-8)
| Wave | Theme | Count | Key Projects |
|---|---|---|---|
| Wave 4 | Real-time Audio/Signal | 15 | SpikeAudio-RT, NeuroVoice, SpikeDSP, SpikeSpeech |
| Wave 5 | Thorpe TB Architecture | 20 | ThorpeBrain-Core, SparseSpike-Trillion, NofM-Encoding |
| Wave 6 | Differentiable Tree Machines | 15 | SpikeTree-Core, TreeSpike-Parse, NeuroTree-Logic |
| Wave 7 | DeepSeek/RNN Integration | 15 | DeepSpike-R2, SpikeRNN-Hybrid, NeuroSeek-Reason |
| Wave 8 | Domain Applications | 20 | SpikeFluid-3D, NeuroCyber-Detect, SpikeWeather |
See individual wave pages for full project listings:
- Core Projects
- Wave 2
- Wave 3
- Wave 4: Audio/Signal
- Wave 5: Thorpe TB
- Wave 6: Tree Machines
- Wave 7: DeepSeek/RNN
- Wave 8: Domain Apps
Agent Architecture
Each project has a dedicated Claude Code agent (Sonnet-class) coordinated by a master orchestrator (Opus-class):
orchestrator-agent (Opus)
|
+-- rosa-agent (paper/)
+-- grandmother-agent (paper3/)
+-- spikegpt-agent (paper4/)
+-- memory-agent (paper6/)
+-- imagination-agent (paper7/)
+-- audio-agent (paper8/)
|
+-- spikemoe-agent (paper26/)
+-- neuromamba-agent (paper27/)
+-- ... (one agent per paper26-45)
|
+-- audio-snn-agent (Wave 4 coordinator, paper46-60)
+-- thorpe-tb-agent (Wave 5 coordinator, paper61-80)
+-- tree-snn-agent (Wave 6 coordinator, paper81-95)
+-- deepseek-snn-agent (Wave 7 coordinator, paper96-110)
+-- domain-snn-agent (Wave 8 coordinator, paper111-130)
See Agent Architecture for details.
Computing Resources for Research
| Machine | Role | GPU | RAM |
|---|---|---|---|
| MEGATRON | Full training, distributed experiments | 2x RTX 3090 (48 GB) | 251 GiB |
| Lambda Laptop | Ablations, single-GPU experiments | 1x RTX GPU | 64 GB |
| Mac Studio | Inference, visualization, large models | M2 Ultra (MPS) | 512 GB |
| MacBook M4 | Development, quick tests | M4 Max (MPS) | 64 GB |
Review System
Each project undergoes systematic review with scoring across four dimensions:
| Dimension | Weight | Description |
|---|---|---|
| Concept & Design | 25% | Research hypothesis, novelty, related work |
| Implementation | 30% | Code quality, tests, documentation |
| Data & Experiments | 25% | Dataset setup, experiment configs |
| Results & Analysis | 20% | Metrics, visualizations, paper readiness |
Review artifacts per project: SUMMARY.md, CLAUDE.md, GAPS.md, PROPOSALS.md
Quick Commands
# Check all project status
for dir in paper paper3 paper4 paper6 paper7 paper8 paper{26..45}; do
echo "=== $dir ===" && head -5 /home/lucas/Papers/$dir/REVIEW.md 2>/dev/null
done
# Run orchestrator
python /home/lucas/ultrathink_orchestrator.py status
python /home/lucas/ultrathink_orchestrator.py launch
python /home/lucas/ultrathink_orchestrator.py collect
# Run reviews
python /home/lucas/Papers/ultrathink_review_orchestrator.py status
python /home/lucas/Papers/ultrathink_review_orchestrator.py launch
# GPU status for training
nvidia-smi --query-gpu=index,memory.used,utilization.gpu --format=csv
Core Projects
The original ULTRATHINK research projects, focused on foundational spiking neural network and rank-order coding techniques.
Project Summary
| Project | Directory | Purpose | Agent | Has Code |
|---|---|---|---|---|
| ROSA ViT | Papers/paper/ | Rank-Order Spiking Attention for vision transformers | rosa-agent | No |
| Grandmother | Papers/paper3/ | Invertible Rank-Order Autoencoder | grandmother-agent | Yes |
| SpikeGPT | Papers/paper4/ | O(N) Attention via Spike Timing for language | spikegpt-agent | No |
| Memory Engine | Papers/paper6/ | Hebbian Memory for Continual Learning | memory-agent | No |
| Imagination | Papers/paper7/ | SNN-based Video Generation | imagination-agent | No |
| Audio Engine | Papers/paper8/ | SNN Audio Processing | audio-agent | No |
ROSA ViT (paper/)
Rank-Order Spiking Attention applied to Vision Transformers. The core technique encodes input features as spike timing patterns (rank-order coding) and computes attention using temporal coincidence detection rather than dot-product similarity.
Grandmother (paper3/)
An invertible autoencoder using rank-order coding, inspired by the "grandmother cell" hypothesis in neuroscience. Features working code implementation.
SpikeGPT (paper4/)
Adapts the GPT architecture to use spike-timing-based attention, achieving O(N) complexity instead of O(N^2) by leveraging temporal sparsity in spike trains.
Memory Engine (paper6/)
Implements Hebbian learning rules for continual learning in spiking networks, enabling memory consolidation without catastrophic forgetting.
Imagination (paper7/)
SNN-based generative model for video, producing temporally coherent frame sequences through spike-based dynamics.
Audio Engine (paper8/)
Applies spiking neural networks to audio processing tasks, leveraging the natural temporal structure of audio signals.
Wave 2: Extended (paper26-35)
Extended SNN architectures exploring new model families (MoE, SSM, BERT, Normalizing Flows, Point Clouds, World Models, Retrieval, NeRF, Codecs, Navigation).
Projects
| Project | Directory | Purpose | Agent | Has Code |
|---|---|---|---|---|
| SpikeMoE | Papers/paper26/ | Mixture of Experts with Spike-Gated Routing | spikemoe-agent | Yes |
| NeuroMamba | Papers/paper27/ | State Space Models with Spiking Dynamics | neuromamba-agent | Yes |
| TempoBERT | Papers/paper28/ | Temporal Coding for Language Understanding | tempobert-agent | No |
| SpikeFlow | Papers/paper29/ | Normalizing Flows with Neuromorphic Primitives | spikeflow-agent | No |
| ROSA-3D | Papers/paper30/ | Rank-Order Attention for Point Clouds | rosa3d-agent | No |
| SpikeDreamer | Papers/paper31/ | World Models with Spiking Inference | spikedreamer-agent | No |
| NeuroRetrieval | Papers/paper32/ | Spike-Based Dense Retrieval | neuroretrieval-agent | No |
| EventNeRF | Papers/paper33/ | Neural Radiance Fields from Event Cameras | eventnerf-agent | Yes |
| SpikeCodec | Papers/paper34/ | Neuromorphic Video Compression | spikecodec-agent | No |
| NeuroNav | Papers/paper35/ | Spiking Networks for Robot Navigation | neuronav-agent | Yes |
All 10 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 3: paper36-45
Advanced SNN applications including self-supervised learning, GANs, diffusion models, graph networks, RAG, SAT solving, vision-language alignment, RL, forecasting, and KANs.
Projects
| Project | Directory | Purpose | Agent | Has Code |
|---|---|---|---|---|
| SpikeSSL | Papers/paper36/ | Self-Supervised Learning via Spike Timing | spikessl-agent | No |
| NeuroGAN | Papers/paper37/ | Spiking Generative Adversarial Networks | neurogan-agent | Yes |
| SpikeDiff | Papers/paper38/ | Diffusion Models with Neuromorphic Dynamics | spikediff-agent | No |
| TempoGraph | Papers/paper39/ | Temporal Graph Networks with Spike Communication | tempograph-agent | Yes |
| SpikeRAG | Papers/paper40/ | Retrieval-Augmented Generation with Spike Memory | spikerag-agent | Yes |
| NeuroSAT | Papers/paper41/ | Boolean Satisfiability via Spiking Networks | neurosat-agent | Yes |
| SpikeCLIP | Papers/paper42/ | Contrastive Vision-Language with Spike Alignment | spikeclip-agent | Yes |
| TempoRL | Papers/paper43/ | Reinforcement Learning with Spike-Time Rewards | temporl-agent | No |
| NeuroCast | Papers/paper44/ | Time Series Forecasting with Spiking Reservoirs | neurocast-agent | No |
| SpikeKAN | Papers/paper45/ | Kolmogorov-Arnold Networks with Spike Functions | spikekan-agent | Yes |
All 10 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 4: Audio/Signal (paper46-60)
Real-time audio and signal processing with spiking neural networks. Coordinated by the audio-snn-agent.
Projects
| Project | Directory | Purpose |
|---|---|---|
| SpikeAudio-RT | Papers/paper46/ | Real-time audio processing with SNNs |
| NeuroVoice | Papers/paper47/ | Voice synthesis and processing |
| SpikeDSP | Papers/paper48/ | Digital signal processing primitives |
| AudioSpike-Stream | Papers/paper49/ | Streaming audio with spike encoding |
| NeuroBeamform | Papers/paper50/ | Beamforming with spiking networks |
| SpikeCodec-Audio | Papers/paper51/ | Audio compression via neuromorphic coding |
| RealSpike-Music | Papers/paper52/ | Real-time music processing |
| NeuroSonar | Papers/paper53/ | Sonar signal processing |
| SpikeSpeech | Papers/paper54/ | Speech recognition with SNNs |
| AudioEvent-SNN | Papers/paper55/ | Audio event detection |
| NeuroEQ | Papers/paper56/ | Neural equalization |
| SpikeReverb | Papers/paper57/ | Reverb modeling with spikes |
| NeuroMixer | Papers/paper58/ | Neural audio mixing |
| SpikeSynth | Papers/paper59/ | Spiking audio synthesis |
| AudioAnomaly-SNN | Papers/paper60/ | Audio anomaly detection |
All 15 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 5: Thorpe TB (paper61-80)
Trillion-neuron spiking neural network architecture inspired by Simon Thorpe's work. Coordinated by the thorpe-tb-agent.
Projects
| Project | Directory | Purpose |
|---|---|---|
| ThorpeBrain-Core | Papers/paper61/ | Core trillion-neuron SNN architecture |
| SparseSpike-Trillion | Papers/paper62/ | Sparse spike communication at trillion scale |
| NofM-Encoding | Papers/paper63/ | N-of-M spike encoding scheme |
| EmergentSNN | Papers/paper64/ | Emergent behavior in large SNNs |
| TB-TextUnderstand | Papers/paper65/ | Text understanding at TB scale |
| TB-Vision | Papers/paper66/ | Vision processing at TB scale |
| TB-VideoStream | Papers/paper67/ | Video streaming processing |
| TB-AudioTemporal | Papers/paper68/ | Audio temporal processing |
| SparseHebbian | Papers/paper69/ | Sparse Hebbian learning rules |
| TB-DistributedTrain | Papers/paper70/ | Distributed training for TB models |
| TB-Compression | Papers/paper71/ | Model compression for TB architecture |
| TB-Memory | Papers/paper72/ | Memory systems for TB models |
| TB-Prediction | Papers/paper73/ | Predictive processing in TB |
| TB-Continual | Papers/paper74/ | Continual learning at TB scale |
| SparseAttention-TB | Papers/paper75/ | Sparse attention mechanisms |
| TB-Hardware | Papers/paper76/ | Hardware design for TB deployment |
| TB-Plasticity | Papers/paper77/ | Synaptic plasticity rules |
| TB-MultiModal | Papers/paper78/ | Multi-modal processing |
| TB-Reasoning | Papers/paper79/ | Reasoning capabilities |
| TB-Benchmark | Papers/paper80/ | Benchmarking TB architecture |
All 20 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 6: Tree Machines (paper81-95)
Integration of differentiable tree machines with spiking neural networks for structured computation. Coordinated by the tree-snn-agent.
Projects
| Project | Directory | Purpose |
|---|---|---|
| SpikeTree-Core | Papers/paper81/ | Core tree-SNN integration |
| TreeSpike-Parse | Papers/paper82/ | Parsing with tree-structured SNNs |
| NeuroTree-Logic | Papers/paper83/ | Logical reasoning via tree SNNs |
| TreeSNN-Compose | Papers/paper84/ | Compositional computation |
| DiffTree-Arith | Papers/paper85/ | Arithmetic with differentiable trees |
| SpikeTree-NLU | Papers/paper86/ | Natural language understanding |
| TreeSpike-Math | Papers/paper87/ | Mathematical reasoning |
| NeuroTree-Plan | Papers/paper88/ | Planning with tree structures |
| TreeSNN-Code | Papers/paper89/ | Code generation and understanding |
| SpikeTree-QA | Papers/paper90/ | Question answering |
| TreeSpike-Entail | Papers/paper91/ | Textual entailment |
| NeuroTree-Graph | Papers/paper92/ | Graph reasoning |
| TreeSNN-Symbolic | Papers/paper93/ | Symbolic reasoning |
| SpikeTree-Recursive | Papers/paper94/ | Recursive computation |
| TreeSpike-Abstract | Papers/paper95/ | Abstract reasoning |
All 15 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 7: DeepSeek/RNN (paper96-110)
Integration of DeepSeek R2 and RNN architectures with spiking neural networks. Coordinated by the deepseek-snn-agent.
Projects
| Project | Directory | Purpose |
|---|---|---|
| DeepSpike-R2 | Papers/paper96/ | DeepSeek R2 with SNN components |
| SpikeRNN-Hybrid | Papers/paper97/ | Hybrid RNN-SNN models |
| NeuroSeek-Reason | Papers/paper98/ | Reasoning via SNN-enhanced DeepSeek |
| SpikeOCR-Latent | Papers/paper99/ | Latent OCR with spike encoding |
| DeepSpike-Context | Papers/paper100/ | Long-context processing |
| RNN-SNN-Bridge | Papers/paper101/ | Bridging RNN and SNN paradigms |
| NeuroSeek-Vision | Papers/paper102/ | Visual understanding |
| SpikeLatent-Compress | Papers/paper103/ | Latent space compression |
| DeepSpike-Long | Papers/paper104/ | Long-sequence processing |
| RNN-TB-Scale | Papers/paper105/ | Scaling RNN-SNN to TB |
| NeuroSeek-Multi | Papers/paper106/ | Multi-modal integration |
| SpikeRNN-Memory | Papers/paper107/ | Memory mechanisms |
| DeepSpike-Efficient | Papers/paper108/ | Efficiency optimization |
| RNN-SNN-Train | Papers/paper109/ | Training methodology |
| NeuroSeek-Deploy | Papers/paper110/ | Deployment strategies |
All 15 projects are in "Reviewed" status with CLAUDE.md agent context files.
Wave 8: Domain Apps (paper111-130)
Domain-specific applications of spiking neural networks across physical sciences, security, vision, time series, and sensing. Coordinated by the domain-snn-agent.
Projects by Category
Physical Sciences
| Project | Directory | Purpose |
|---|---|---|
| SpikeFluid-3D | Papers/paper111/ | Fluid dynamics simulation |
| NeuroMaterial | Papers/paper112/ | Material science modeling |
| SpikeConcrete | Papers/paper113/ | Concrete analysis |
| NeuroAgri-Genomics | Papers/paper114/ | Agricultural genomics |
| SpikeSeed-Patent | Papers/paper115/ | Patent analysis for seeds |
Security
| Project | Directory | Purpose |
|---|---|---|
| NeuroCyber-Detect | Papers/paper116/ | Cybersecurity threat detection |
| SpikeSecure-Net | Papers/paper117/ | Network security |
| NeuroMalware | Papers/paper118/ | Malware detection |
Vision
| Project | Directory | Purpose |
|---|---|---|
| SpikeText-Detect | Papers/paper119/ | Text detection in images |
| NeuroOCR-Edge | Papers/paper120/ | Edge-deployed OCR |
Time Series
| Project | Directory | Purpose |
|---|---|---|
| SpikeWeather | Papers/paper121/ | Weather forecasting |
| NeuroTraffic | Papers/paper122/ | Traffic prediction |
| SpikeFinance | Papers/paper123/ | Financial time series |
| NeuroHealth-Signal | Papers/paper124/ | Health signal monitoring |
| SpikeSeismic | Papers/paper125/ | Seismic event detection |
Sensing
| Project | Directory | Purpose |
|---|---|---|
| NeuroRadar | Papers/paper126/ | Radar signal processing |
| SpikeLidar | Papers/paper127/ | LiDAR point cloud processing |
| NeuroSatellite | Papers/paper128/ | Satellite image analysis |
| SpikeRobot-Control | Papers/paper129/ | Robot control systems |
| NeuroEnergy | Papers/paper130/ | Energy system optimization |
All 20 projects are in "Reviewed" status with CLAUDE.md agent context files.
Agent Architecture
The ULTRATHINK research system uses a hierarchical Claude Code agent architecture with specialized agents per project and wave coordinators.
Agent Hierarchy
orchestrator-agent (Opus) ─── Master coordinator
|
|── Core Agents (Sonnet)
| |── rosa-agent ──────────── Papers/paper/
| |── grandmother-agent ───── Papers/paper3/
| |── spikegpt-agent ──────── Papers/paper4/
| |── memory-agent ────────── Papers/paper6/
| |── imagination-agent ───── Papers/paper7/
| └── audio-agent ─────────── Papers/paper8/
|
|── Wave 2 Agents (paper26-35, one per project)
| |── spikemoe-agent, neuromamba-agent, tempobert-agent, ...
|
|── Wave 3 Agents (paper36-45, one per project)
| |── spikessl-agent, neurogan-agent, spikediff-agent, ...
|
|── Wave Coordinators
| |── audio-snn-agent ────── Wave 4 (paper46-60)
| |── thorpe-tb-agent ────── Wave 5 (paper61-80)
| |── tree-snn-agent ─────── Wave 6 (paper81-95)
| |── deepseek-snn-agent ─── Wave 7 (paper96-110)
| └── domain-snn-agent ───── Wave 8 (paper111-130)
Model Tiers
| Task | Model | Use |
|---|---|---|
| Strategic planning | Opus | Architecture, cross-project coordination |
| Implementation | Sonnet | Code writing, experiments, per-project work |
| Quick checks | Haiku | Syntax validation, simple queries |
| Verification | Codex/Gemini | External consensus via multi-llm-verify |
Agent Configuration
Agents are defined in ~/.claude/agents/. Each agent has:
- Project-specific context and instructions
- Access to the project's directory
- Knowledge of the review framework
Multi-LLM Verification
For significant changes (>50 lines), the multi-llm-verify skill runs consensus checks across Claude, Codex, and Gemini. Results are logged to ~/.claude/verification-logs/.
Shared Infrastructure
Infrastructure shared across all ULTRATHINK research projects.
Shared Storage
/mnt/shared/
├── datasets/ # Shared datasets (ImageNet, CIFAR, etc.)
├── checkpoints/ # Model checkpoints per project
├── pretrained/ # Pretrained models (TORCH_HOME)
├── logs/ # TensorBoard, MLflow logs
└── results/ # Experiment results
Environment Variables
export {PROJECT}_DATA=/mnt/shared/datasets
export {PROJECT}_CHECKPOINTS=/mnt/shared/checkpoints/{project}
export {PROJECT}_LOGS=/mnt/shared/logs/{project}
export TORCH_HOME=/mnt/shared/pretrained
Services
| Service | Purpose | Access |
|---|---|---|
| MLflow | Experiment tracking | ai-ml namespace |
| JupyterHub | Interactive notebooks | jupyterhub namespace |
| TensorBoard | Training visualization | Docker Compose |
| Ollama | LLM inference | ai-ml namespace |
Compute Resources
| Machine | Use For |
|---|---|
| MEGATRON (2x RTX 3090) | Full training, distributed experiments |
| Lambda Laptop (1x RTX) | Ablations, single-GPU experiments |
| Mac Studio (M2 Ultra) | Inference, visualization, large model loading |
| MacBook M4 (M4 Max) | Development, quick tests |
Review Orchestrator
python /home/lucas/Papers/ultrathink_review_orchestrator.py status
python /home/lucas/Papers/ultrathink_review_orchestrator.py launch
python /home/lucas/Papers/ultrathink_review_orchestrator.py aggregate
python /home/lucas/Papers/ultrathink_review_orchestrator.py report
TODO: expand with dataset inventory, checkpoint management, and resource scheduling.
Current Issues
Known issues on MEGATRON, combining auto-detected issues and audit findings.
Partially auto-generated: 2026-03-24
Issue Summary
| # | Severity | Issue | Impact |
|---|---|---|---|
| 1 | CRITICAL | VNC server restart loop (617K+ attempts, no auth) | Security risk, resource waste |
| 2 | CRITICAL | AlertManager at 203% CPU (24K+ hours runtime) | Monitoring degraded, CPU waste |
| 3 | HIGH | TLS certificates NOT READY (4 certs) | HTTPS broken for Harbor, Devtron, docs, monitoring |
| 4 | HIGH | cert-manager HTTP-01 broken behind Cloudflare tunnel | No new certificates can be issued |
| 5 | MEDIUM | SMB share 90% full (79T/88T) | Risk of storage exhaustion |
| 6 | MEDIUM | NFS mounts down (/mnt/cloudy, host unreachable) | Stale mounts, potential process hangs |
| 7 | MEDIUM | 21/31 GB swap in use | Potential performance degradation |
| 8 | MEDIUM | Failed systemd services (DEGRADED state) | Cosmetic, no functional impact |
| 9 | MEDIUM | megatron-docs pod CrashLoopBackOff | Docs site unavailable |
| 10 | LOW | bibliotheca-categorizer restarting | Book categorization broken |
| 11 | LOW | Let's Encrypt staging issuer FALSE | Staging cert testing broken |
Issue 1: VNC Server Restart Loop (CRITICAL)
Description: The VNC server is in an infinite restart loop with 617,000+ restart attempts. It appears to have no authentication configured, making it a security vulnerability if accessible on any network interface.
Impact:
- Security risk: Unauthenticated remote desktop access
- Resource waste: Continuous process spawning
- Log spam: Filling system logs with restart attempts
Suggested Fix:
# Immediately disable the VNC service
sudo systemctl stop 'vncserver@*.service'
sudo systemctl disable 'vncserver@*.service'
# Find and kill any running VNC processes
ps aux | grep -i vnc
sudo kill <pid>
# Verify no VNC ports are listening
ss -tlnp | grep 590
# If VNC is needed, reconfigure WITH authentication before re-enabling
Issue 2: AlertManager at 203% CPU (CRITICAL)
Description: AlertManager has accumulated 24,000+ hours of CPU time and is consuming 203% CPU (2+ cores). This suggests a memory leak, alert routing loop, or excessive alert volume.
Impact:
- Wasting 2+ CPU cores continuously
- Monitoring and alerting may be unreliable
- Could contribute to overall system load
Suggested Fix:
# Check AlertManager pod
kubectl get pods -n monitoring -l app.kubernetes.io/name=alertmanager
# Check resource usage
kubectl top pod -n monitoring
# Restart AlertManager
kubectl rollout restart statefulset/alertmanager -n monitoring
# If issue persists, check for alert routing loops
kubectl get configmap -n monitoring -o yaml | grep -A 20 alertmanager
Issue 3: TLS Certificates NOT READY (HIGH)
Four certificates are in NOT READY state:
| Namespace | Certificate | Ready | Age |
|---|---|---|---|
| devtroncd | devtron-tls | False | 20d |
| docs | megatron-docs-tls | False | 6m |
| monitoring | wildcard-sslip-tls | False | 87d |
| registry | harbor-tls | False | 20d |
Root Cause: ClusterIssuer uses HTTP-01 ACME challenges which cannot complete behind the Cloudflare tunnel.
Fix: Migrate to DNS-01 solver. See Certificate Renewal.
Issue 4: cert-manager HTTP-01 Broken Behind Tunnel (HIGH)
Description: The letsencrypt-prod ClusterIssuer uses HTTP-01 challenges. Cloudflare's "Always Use HTTPS" redirects the challenge request, causing ACME validation to fail.
Impact:
- No new certificates can be issued
- Existing certificates will fail to auto-renew at expiry
- All four NOT READY certs stem from this root cause
Suggested Fix: Switch to DNS-01 solver with Cloudflare API token. Detailed steps in Certificate Renewal.
Issue 5: SMB Share 90% Full (MEDIUM)
Description: The network SMB share at //10.0.0.41/Main (mounted as /mnt/sunny) is 90% full (79T/88T), with ~8.2T remaining.
Impact: Risk of share filling completely, causing write failures for any workloads using the share.
Suggested Fix:
# Audit large files
du -sh /mnt/sunny/*/ | sort -rh | head -20
# Find old, large files
find /mnt/sunny -atime +180 -size +1G -ls 2>/dev/null | head -30
# Consider archiving or expanding the NAS
Issue 6: NFS Mounts Down (MEDIUM)
Description: NFS mounts at /mnt/cloudy and /mnt/cloudy-rw are unreachable -- the NFS host is down.
Impact: Stale NFS mounts can cause process hangs when accessed (e.g., ls, df, or du commands may block indefinitely).
Suggested Fix:
# Lazy unmount to prevent hangs
sudo umount -l /mnt/cloudy
sudo umount -l /mnt/cloudy-rw
# If NFS is no longer needed, comment out in /etc/fstab
# Otherwise, restore the NFS host and remount
Issue 7: High Swap Usage (MEDIUM)
Description: Swap is at 62-68% (approximately 20-21 GiB of 31 GiB used), despite ~206 GiB of RAM being available. This is a result of 37 days of uptime.
Suggested Fix:
# Reclaim swap during a maintenance window
sudo swapoff -a && sudo swapon -a
# Monitor afterwards
free -h
Issue 8: Failed Systemd Services (MEDIUM)
motd-news.service loaded failed failed Message of the Day
wol-enable.service loaded failed failed Enable Wake-on-LAN on all Ethernet interfaces
Impact: None functional. Causes systemctl status to report DEGRADED.
Fix:
sudo systemctl reset-failed motd-news.service
sudo systemctl reset-failed wol-enable.service
Issue 9: megatron-docs Pod CrashLoopBackOff (MEDIUM)
| Namespace | Pod | Status | Restarts |
|---|---|---|---|
| docs | megatron-docs-5dd4d46dbf-x6gbj | CrashLoopBackOff | 5 |
Impact: Documentation site is unavailable.
Suggested Fix:
# Check logs for root cause
kubectl logs -n docs megatron-docs-5dd4d46dbf-x6gbj --previous
# Check events
kubectl describe pod -n docs megatron-docs-5dd4d46dbf-x6gbj
# Fix the issue and restart
kubectl rollout restart deployment/megatron-docs -n docs
Issue 10: bibliotheca-categorizer Restarting (LOW)
bibliotheca-categorizer Restarting (exit 0)
Impact: Book categorization functionality is broken.
Suggested Fix:
docker logs bibliotheca-categorizer --tail=100
docker inspect bibliotheca-categorizer --format='{{.State.ExitCode}}'
# Fix underlying issue, then: docker restart bibliotheca-categorizer
Issue 11: Let's Encrypt Staging Issuer FALSE (LOW)
Impact: Cannot test certificate issuance with the staging CA. Will be resolved as part of the DNS-01 migration.
Degraded Services
Services currently in a degraded, failed, or problematic state on MEGATRON.
Systemd Failed Services
| Service | Unit | State | Impact | Resolution |
|---|---|---|---|---|
| MOTD News | motd-news.service | Failed | None | sudo systemctl reset-failed motd-news.service |
| Wake-on-LAN | wol-enable.service | Failed | None | sudo systemctl mask wol-enable.service |
These services cause the system to report State: degraded in systemctl status, but have no functional impact.
# Check system state
systemctl status
# List failed units
systemctl --failed
# Reset all failed units
sudo systemctl reset-failed
Kubernetes Certificate Issues
| Certificate | Namespace | State | Duration | Root Cause |
|---|---|---|---|---|
| harbor-tls | registry | NOT READY | 20 days | HTTP-01 solver broken behind CF tunnel |
| devtron-tls | devtroncd | NOT READY | 20 days | HTTP-01 solver broken behind CF tunnel |
| wildcard-sslip-tls | monitoring | NOT READY | Unknown | HTTP-01 solver broken behind CF tunnel |
Resolution: Migrate cert-manager to DNS-01 solver. See Certificate Renewal.
# Check all certificate states
kubectl get certificates -A
# Check pending challenges
kubectl get challenges -A
# View cert-manager logs for errors
kubectl logs -n cert-manager deployment/cert-manager --tail=200
Kubernetes Pod Issues
AlertManager (203% CPU)
| Property | Value |
|---|---|
| Namespace | monitoring |
| Issue | 203% CPU consumption |
| CPU Hours | 24,000+ accumulated |
| Likely Cause | Memory leak or alert routing loop |
# Check AlertManager status
kubectl get pods -n monitoring -l app.kubernetes.io/name=alertmanager
# Check resource consumption
kubectl top pod -n monitoring
# Restart
kubectl rollout restart statefulset/alertmanager -n monitoring
Linkerd (Recently Deployed)
| Property | Value |
|---|---|
| Namespace | linkerd |
| Status | Running |
| Age | 11 hours |
| Concern | Very recently deployed; monitor for stability |
Linkerd was deployed/redeployed very recently. Watch for:
- Proxy injection issues
- mTLS handshake failures
- Increased latency
# Check Linkerd health
kubectl get pods -n linkerd
linkerd check # if CLI installed
Vault (Low Uptime)
| Property | Value |
|---|---|
| Namespace | vault |
| Uptime | 3h51m at audit time |
| Concern | Recently restarted; may need unsealing |
# Check Vault status
kubectl get pods -n vault
kubectl exec -n vault vault-0 -- vault status
Docker Container Issues
bibliotheca-categorizer (Restart Loop)
| Property | Value |
|---|---|
| Container | bibliotheca-categorizer |
| Image | custom |
| Status | RESTARTING (continuous) |
| Impact | Book categorization broken |
# Check restart count
docker inspect bibliotheca-categorizer --format='{{.RestartCount}}'
# Check last exit code
docker inspect bibliotheca-categorizer --format='{{.State.ExitCode}}'
# View recent logs
docker logs bibliotheca-categorizer --tail=50
# Stop the restart loop temporarily
docker update --restart=no bibliotheca-categorizer
VNC Server (Restart Loop, No Auth)
| Property | Value |
|---|---|
| Service | VNC server |
| Status | Restart loop (617K+ attempts) |
| Auth | NONE (security risk) |
| Impact | Resource waste, security vulnerability |
This is the most urgent degraded service due to the security implications. See Current Issues for remediation steps.
# Find and stop VNC processes
ps aux | grep -i vnc
sudo systemctl stop 'vncserver@*'
sudo systemctl disable 'vncserver@*'
# Verify no VNC ports are listening
ss -tlnp | grep -E '590[0-9]'
Service Health Dashboard
Service Status Action Needed
─────────────────────────────────────────────────────
systemd overall DEGRADED Reset failed units
motd-news.service FAILED Reset or disable
wol-enable.service FAILED Mask service
AlertManager 203% CPU Restart pod
harbor-tls NOT READY DNS-01 migration
devtron-tls NOT READY DNS-01 migration
monitoring certs NOT READY DNS-01 migration
Vault LOW UPTIME Monitor stability
Linkerd NEW DEPLOY Monitor stability
bibliotheca-categorizer RESTARTING Debug and fix
VNC server RESTART LOOP Kill immediately
NFS mounts HOST DOWN Lazy unmount
Daily Health Check
Step-by-step procedure for verifying MEGATRON system health. Run these checks daily or after any maintenance event.
Quick Check (5 minutes)
Run this for a rapid overview:
# 1. System basics
echo "=== UPTIME ===" && uptime
echo "=== MEMORY ===" && free -h
echo "=== DISK ===" && df -h / | tail -1
echo "=== GPU ===" && nvidia-smi --query-gpu=index,memory.used,temperature.gpu,power.draw --format=csv,noheader
# 2. Kubernetes nodes
echo "=== K3s NODES ===" && kubectl get nodes
# 3. Problem pods
echo "=== NON-RUNNING PODS ===" && kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
# 4. Certificate issues
echo "=== CERT STATUS ===" && kubectl get certificates -A | grep -v "True"
# 5. Docker containers
echo "=== DOCKER ISSUES ===" && docker ps -a --filter "status=restarting" --filter "status=exited"
Full Health Check Procedure
Step 1: System Resources
# Check load averages and uptime
uptime
# Expected: load < 40 (for 128 threads), uptime consistent
Check memory:
free -h
| Metric | Healthy | Warning | Critical |
|---|---|---|---|
| RAM Used | < 80% (< 200 GiB) | 80-90% | > 90% |
| Swap Used | < 50% (< 15 GiB) | 50-80% | > 80% |
Check disk:
df -h /
df -h /path/to/smb/mount # if mounted
| Mount | Healthy | Warning | Critical |
|---|---|---|---|
| Root (/) | < 75% | 75-85% | > 85% |
| SMB share | < 85% | 85-95% | > 95% |
Step 2: GPU Status
nvidia-smi
| Metric | Healthy | Warning | Critical |
|---|---|---|---|
| Temperature | < 75C | 75-85C | > 85C |
| VRAM | As expected for workload | Unexpected allocation | OOM errors |
| Power | < 300W each | > 300W sustained | Throttling |
Check for stuck GPU processes:
nvidia-smi --query-compute-apps=pid,name,used_memory --format=csv
Step 3: Kubernetes Nodes
kubectl get nodes -o wide
All three nodes (megatron, thing1, thing2) should show Ready. If any show NotReady:
kubectl describe node <node-name>
# Check for disk pressure, memory pressure, PID pressure, or network issues
Step 4: Kubernetes Pods
# All non-running pods (excluding completed jobs)
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
# Pods with restarts
kubectl get pods -A -o wide | awk '$5 > 5 {print}'
# Recently crashed pods
kubectl get events -A --sort-by='.lastTimestamp' | grep -E "BackOff|Failed|Error|OOM" | tail -20
Step 5: TLS Certificates
kubectl get certificates -A
All certificates should show True in the READY column. If any show False:
kubectl describe certificate <name> -n <namespace>
kubectl get challenges -A # Check for pending ACME challenges
Step 6: Key Services
Authentik (SSO):
kubectl get pods -n authentik
# Verify: auth.m3gatr0n.com responds
curl -s -o /dev/null -w "%{http_code}" https://auth.m3gatr0n.com/
Vault (Secrets):
kubectl get pods -n vault
kubectl exec -n vault vault-0 -- vault status 2>/dev/null | grep "Sealed"
# Should show: Sealed false
Monitoring:
kubectl get pods -n monitoring
# Check AlertManager CPU
kubectl top pod -n monitoring -l app.kubernetes.io/name=alertmanager
Cloudflare Tunnel:
systemctl status cloudflared
# Verify: external domain responds
curl -s -o /dev/null -w "%{http_code}" https://stiq.us/
Step 7: Docker Containers
# Check for problems
docker ps -a --format "table {{.Names}}\t{{.Status}}" | grep -E "Restarting|Exited"
# Check Bibliotheca stack
docker ps --filter "name=bibliotheca" --format "table {{.Names}}\t{{.Status}}"
Step 8: Network Mounts
# Check SMB mount
mount | grep cifs
ls /path/to/smb/mount > /dev/null 2>&1 && echo "SMB: OK" || echo "SMB: FAILED"
# Check NFS (expect failure currently)
mount | grep nfs
ls /mnt/cloudy > /dev/null 2>&1 && echo "NFS: OK" || echo "NFS: DOWN"
Step 9: Tailscale
tailscale status
Verify all four machines are connected:
- megatron (100.70.25.47)
- lucass-mac-studio (100.87.201.64)
- macbook-pro-m4 (100.91.253.88)
- tensorbook (100.108.49.109)
Health Check Summary Template
Date: YYYY-MM-DD
Operator: ___________
System Resources:
[ ] Load average < 40
[ ] RAM usage < 80%
[ ] Swap usage < 50%
[ ] Root disk < 75%
[ ] SMB share < 85%
GPU:
[ ] Both GPUs detected
[ ] Temperatures < 75C
[ ] No stuck processes
Kubernetes:
[ ] All 3 nodes Ready
[ ] No CrashLoopBackOff pods
[ ] All certificates Ready (or known exceptions)
Services:
[ ] Authentik responding
[ ] Vault unsealed
[ ] AlertManager CPU normal
[ ] Cloudflare tunnel active
[ ] Tailscale mesh connected
Docker:
[ ] No unexpected container restarts
Network:
[ ] SMB mount accessible
[ ] NFS status: [expected down / restored]
Known Issues Unchanged:
[ ] VNC (disabled / still running)
[ ] AlertManager CPU (restarted / still high)
[ ] Harbor TLS (fixed / still pending)
Notes:
___________________________________________
Restart a Service
Procedures for restarting services on MEGATRON, covering K3s pods, systemd services, and Docker containers.
Kubernetes Pod / Deployment
# Restart a deployment (graceful rolling restart)
kubectl rollout restart deployment/<name> -n <namespace>
# Restart a statefulset
kubectl rollout restart statefulset/<name> -n <namespace>
# Delete a pod (it will be recreated by its controller)
kubectl delete pod <pod-name> -n <namespace>
# Force delete a stuck pod
kubectl delete pod <pod-name> -n <namespace> --grace-period=0 --force
# Check rollout status
kubectl rollout status deployment/<name> -n <namespace>
Systemd Service
# Restart a service
sudo systemctl restart <service-name>
# Stop and start
sudo systemctl stop <service-name>
sudo systemctl start <service-name>
# Check status
sudo systemctl status <service-name>
# View logs
journalctl -u <service-name> --since "5 minutes ago"
Key services:
k3s.service-- K3s server (WARNING: restarts entire control plane)sshd.service-- SSH daemonsshd-rescue.service-- Rescue SSHcloudflared.service-- Cloudflare tunneltailscaled.service-- Tailscale VPNdocker.service-- Docker daemon
Docker Container
# Restart a container
docker restart <container-name>
# Stop and start
docker stop <container-name>
docker start <container-name>
# Restart entire compose stack
cd /path/to/project && docker compose restart
# Rebuild and restart
docker compose up -d --build <service-name>
Cautions
- k3s.service: Restarting K3s disrupts all pods. Only restart during planned maintenance.
- docker.service: Restarting Docker stops all non-K3s containers.
- cloudflared.service: Restarting interrupts all external traffic for a few seconds.
Certificate Renewal
This runbook covers fixing the broken TLS certificate issuance and migrating from HTTP-01 to DNS-01 ACME challenge solver.
Background
The current letsencrypt-prod ClusterIssuer uses HTTP-01 challenges, which fail behind the Cloudflare tunnel because Cloudflare redirects HTTP to HTTPS. The fix is to switch to DNS-01 challenges using the Cloudflare DNS API.
Prerequisites
- Access to the Cloudflare dashboard for the relevant domains
kubectlaccess to the cluster- Cloudflare API token with DNS edit permissions
Step 1: Create Cloudflare API Token
- Log in to Cloudflare dashboard: https://dash.cloudflare.com
- Go to My Profile > API Tokens > Create Token
- Use the Edit zone DNS template or create custom:
- Permissions: Zone > DNS > Edit
- Zone Resources: Include > Specific zone > (select each domain: m3gatr0n.com, stiq.us, corestation.io, idp.pro, kelseyfarmequipment.com)
- Or: Include > All zones (simpler but broader)
- Create and copy the token
Step 2: Create Kubernetes Secret
kubectl create secret generic cloudflare-api-token \
--namespace cert-manager \
--from-literal=api-token=<YOUR_CLOUDFLARE_API_TOKEN>
Verify:
kubectl get secret cloudflare-api-token -n cert-manager
Step 3: Update ClusterIssuer (Staging First)
Test with the staging issuer first:
# letsencrypt-staging-dns01.yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
spec:
acme:
server: https://acme-staging-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-staging-key
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
name: cloudflare-api-token
key: api-token
Apply:
kubectl apply -f letsencrypt-staging-dns01.yaml
Verify the issuer becomes ready:
kubectl get clusterissuer letsencrypt-staging
kubectl describe clusterissuer letsencrypt-staging
Step 4: Test with a Staging Certificate
# test-cert.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: test-dns01-cert
namespace: default
spec:
secretName: test-dns01-tls
issuerRef:
name: letsencrypt-staging
kind: ClusterIssuer
dnsNames:
- test.m3gatr0n.com
kubectl apply -f test-cert.yaml
# Watch the certificate progress
kubectl get certificate test-dns01-cert -w
kubectl get challenges -A
# Should become Ready within 1-2 minutes
If successful, clean up the test cert:
kubectl delete -f test-cert.yaml
Step 5: Update Production ClusterIssuer
# letsencrypt-prod-dns01.yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-prod-key
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
name: cloudflare-api-token
key: api-token
Apply:
kubectl apply -f letsencrypt-prod-dns01.yaml
Verify:
kubectl get clusterissuer letsencrypt-prod
kubectl describe clusterissuer letsencrypt-prod
# Status should show Ready: True
Step 6: Re-Request Failed Certificates
Delete the failed certificates so cert-manager re-creates them with the new solver:
# Harbor
kubectl delete certificate harbor-tls -n registry
# The Certificate resource should be re-created by the Harbor Helm chart
# or you may need to re-apply the Certificate manifest
# Devtron
kubectl delete certificate devtron-tls -n devtroncd
# Monitoring
kubectl delete certificate wildcard-sslip-tls -n monitoring
If the Certificate resources are not automatically recreated (not managed by Helm/operator), recreate them:
# harbor-tls.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: harbor-tls
namespace: registry
spec:
secretName: harbor-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
dnsNames:
- registry.m3gatr0n.com
kubectl apply -f harbor-tls.yaml
Step 7: Verify All Certificates
# Check all certificates
kubectl get certificates -A
# All should show READY = True
# Wait up to 5 minutes for DNS propagation and ACME validation
Expected output:
NAMESPACE NAME READY SECRET AGE
default kuber-ca True kuber-ca ...
default wildcard-sslip True wildcard-sslip-tls ...
kube-system traefik-dashboard-tls True traefik-dashboard-tls ...
registry harbor-tls True harbor-tls ...
devtroncd devtron-tls True devtron-tls ...
monitoring wildcard-sslip-tls True wildcard-sslip-tls ...
Troubleshooting
Challenge stuck in pending
# Check challenge details
kubectl get challenges -A
kubectl describe challenge <name> -n <namespace>
# Common issues:
# - API token lacks permission for the zone
# - DNS propagation delay (wait 2-5 minutes)
# - Rate limiting (check cert-manager logs)
cert-manager logs
kubectl logs -n cert-manager deployment/cert-manager --tail=200 -f
DNS record not created
# Verify Cloudflare API token works
curl -X GET "https://api.cloudflare.com/client/v4/zones" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Content-Type: application/json"
Rate limiting
Let's Encrypt has rate limits:
- 50 certificates per registered domain per week
- 5 duplicate certificates per week
- Use the staging issuer for testing to avoid hitting limits
Ongoing Maintenance
After migration, certificates will auto-renew via DNS-01. No manual intervention needed unless:
- The Cloudflare API token expires or is revoked
- A new domain is added (token needs zone access)
- cert-manager is upgraded or reinstalled (re-apply ClusterIssuer)
Disk Cleanup
Procedures for freeing disk space on MEGATRON when root or network storage is running low.
Quick Assessment
# Root filesystem usage
df -h /
# Largest directories under /home
du -sh /home/lucas/*/ 2>/dev/null | sort -rh | head -20
# Docker disk usage
docker system df
# K3s / containerd images
crictl images | sort -k3 -h
# Stale containers
docker ps -a --filter "status=exited" --format "table {{.Names}}\t{{.Size}}\t{{.Status}}"
Cleanup Targets
Docker (typical savings: 5-50 GB)
# Remove stopped containers
docker container prune
# Remove unused images
docker image prune -a
# Remove unused volumes (CAUTION: verify no needed data)
docker volume prune
# Full cleanup
docker system prune -a --volumes
Conda Environments (~/miniconda3/ = 44 GB)
# List environments
conda env list
# Remove unused environments
conda env remove -n <env-name>
# Clean package cache
conda clean --all
Research Data (~/Papers/ = 234 GB)
# Find large checkpoint files
find ~/Papers/ -name "*.pt" -o -name "*.pth" -o -name "*.ckpt" | xargs du -sh | sort -rh | head -20
# Find large log directories
find ~/Papers/ -name "logs" -type d | xargs du -sh | sort -rh | head -10
System Logs
# Check journal size
journalctl --disk-usage
# Vacuum old logs (keep 1 week)
sudo journalctl --vacuum-time=7d
SMB Share Cleanup (90% full)
# Largest directories
du -sh /mnt/sunny/*/ 2>/dev/null | sort -rh | head -20
# Files not accessed in 6+ months
find /mnt/sunny -atime +180 -size +1G -ls 2>/dev/null | head -30
TODO: expand with automated cleanup scripts and monitoring thresholds.
Node Recovery
Procedures for recovering K3s cluster nodes that are NotReady, unreachable, or require re-joining.
Diagnosing Node Issues
# Check node status
kubectl get nodes -o wide
# Describe the problematic node
kubectl describe node <node-name>
# Check events
kubectl get events --field-selector involvedObject.name=<node-name> --sort-by='.lastTimestamp'
Common Scenarios
Node Shows NotReady
- SSH to the node and check the K3s agent:
ssh <node> 'systemctl status k3s-agent'
ssh <node> 'journalctl -u k3s-agent --since "10 minutes ago"'
- Restart the agent:
ssh <node> 'sudo systemctl restart k3s-agent'
Node Unreachable
- Check network connectivity:
ping <node-ip>
ssh <node> 'echo reachable'
- If the node is physically down, drain it:
kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data --timeout=60s
Re-joining a Node
# On the worker node, get the join token from megatron:
K3S_TOKEN=$(ssh megatron 'sudo cat /var/lib/rancher/k3s/server/node-token')
# Install/rejoin K3s agent
curl -sfL https://get.k3s.io | K3S_URL=https://megatron:6443 K3S_TOKEN=$K3S_TOKEN sh -
Post-Recovery
# Verify node is Ready
kubectl get nodes
# Uncordon if drained
kubectl uncordon <node-name>
# Check Longhorn replica health
kubectl get volumes.longhorn.io -n longhorn-system
TODO: expand with automated recovery scripts and monitoring alerts for node health.
Backup & Restore
Procedures for backing up and restoring critical data on MEGATRON.
What to Back Up
| Data | Location | Priority | Method |
|---|---|---|---|
| K3s etcd | /var/lib/rancher/k3s/server/db/ | Critical | K3s snapshot |
| Application databases | K3s PVCs | Critical | pg_dump / Volume snapshots |
| Research data | ~/Papers/ (234 GB) | High | rsync to NAS/Mac Studio |
| Cloudflare tunnel config | /etc/cloudflared/ | High | File copy |
| SSH keys | ~/.ssh/ | High | Encrypted backup |
| Helm values | Various | Medium | Git |
| Docker volumes | /var/lib/docker/volumes/ | Medium | Volume export |
K3s Etcd Snapshot
# Create snapshot
k3s etcd-snapshot save --name manual-backup-$(date +%Y%m%d)
# List snapshots
k3s etcd-snapshot list
# Restore from snapshot
k3s server --cluster-reset --cluster-reset-restore-path=/path/to/snapshot
Database Backups
# PostgreSQL (example for data namespace)
kubectl exec -n data postgres-postgresql-0 -- pg_dumpall -U postgres > backup.sql
# MariaDB (Docker, Coolify)
docker exec bibliotheca-db mysqldump -u root -p --all-databases > mariadb-backup.sql
Research Data Sync
# Sync to Mac Studio
rsync -avz --progress ~/Papers/ mac-studio:~/Papers-backup/
# Sync to SMB share
rsync -avz ~/Papers/ /mnt/sunny/backups/papers/
TODO: expand with automated backup schedules, retention policies, Longhorn snapshot configuration, and disaster recovery testing procedures.
Add Cloudflare Route
This runbook covers adding a new hostname route to the Cloudflare tunnel so that a new subdomain or application is publicly accessible.
Prerequisites
- Access to the
mgtCLI tool (located at/home/lucas/paas/bin/) - The Kubernetes service for the application must already be deployed
- A Traefik IngressRoute must be configured for the hostname
Overview
When you add a new route, the following chain is established:
New hostname (e.g., newapp.m3gatr0n.com)
│
v
Cloudflare DNS (CNAME to tunnel)
│
v
Cloudflare Tunnel (6d8885c4-...)
│
v
cloudflared -> https://localhost:32672
│
v
Traefik IngressRoute (matches Host header)
│
v
K8s Service -> Pod
Step 1: Deploy the Application
Ensure the application is running in K8s with a Service:
# Verify the service exists
kubectl get svc -n <namespace> <service-name>
# Verify pods are running
kubectl get pods -n <namespace> -l app=<app-name>
Step 2: Create Traefik IngressRoute
Create an IngressRoute so Traefik knows how to route traffic for the new hostname:
# ingressroute.yaml
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: newapp-route
namespace: <namespace>
spec:
entryPoints:
- websecure
routes:
- match: Host(`newapp.m3gatr0n.com`)
kind: Rule
services:
- name: <service-name>
port: <service-port>
tls:
certResolver: letsencrypt-prod
# Or reference a specific secret:
# secretName: newapp-tls
Apply:
kubectl apply -f ingressroute.yaml
Step 3: Add Cloudflare Tunnel Route
Use the mgt CLI to add the route:
mgt route add newapp.m3gatr0n.com
This command:
- Adds the hostname to the cloudflared tunnel configuration
- Creates the DNS CNAME record in Cloudflare pointing to the tunnel
- Reloads the tunnel configuration
Manual Alternative
If mgt is unavailable, edit the configuration directly:
# Edit the tunnel config
sudo vim /etc/cloudflared/config.yml
Add the new hostname entry under ingress:
ingress:
# ... existing routes ...
- hostname: newapp.m3gatr0n.com
service: https://localhost:32672
originRequest:
noTLSVerify: true
# The catch-all rule must remain last
- service: http_status:404
Then restart cloudflared:
sudo systemctl restart cloudflared
And create the DNS record in Cloudflare:
# Using cloudflared CLI
cloudflared tunnel route dns 6d8885c4-97d9-43fd-8426-78a00c2834f1 newapp.m3gatr0n.com
Step 4: Create TLS Certificate (if needed)
If using cert-manager (with the DNS-01 solver):
# certificate.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: newapp-tls
namespace: <namespace>
spec:
secretName: newapp-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
dnsNames:
- newapp.m3gatr0n.com
kubectl apply -f certificate.yaml
# Wait for certificate
kubectl get certificate newapp-tls -n <namespace> -w
Note: Since Cloudflare handles public TLS, the internal certificate is optional. The
noTLSVerifyflag in the tunnel config means cloudflared accepts any certificate from Traefik.
Step 5: Verify
# Check DNS resolution
dig newapp.m3gatr0n.com
# Test HTTPS access
curl -v https://newapp.m3gatr0n.com/
# Check Traefik routing
kubectl get ingressroute -n <namespace> newapp-route
# Verify in tunnel route list
mgt route list | grep newapp
Checklist
[ ] Application deployed and Service created
[ ] Traefik IngressRoute applied
[ ] Cloudflare tunnel route added (mgt route add)
[ ] DNS record created (automatic with mgt)
[ ] TLS certificate issued (if using cert-manager)
[ ] HTTPS access verified from external network
[ ] Route appears in mgt route list
Removing a Route
# Remove the tunnel route
mgt route remove newapp.m3gatr0n.com
# Remove the IngressRoute
kubectl delete ingressroute newapp-route -n <namespace>
# Remove the certificate (optional)
kubectl delete certificate newapp-tls -n <namespace>
Deploy New Application
Step-by-step guide for deploying a new application on the MEGATRON K3s cluster with external access via Cloudflare tunnel.
Prerequisites
- Application container image (in Harbor or public registry)
- Domain/subdomain chosen
- Namespace determined
Steps
1. Create Namespace
kubectl create namespace <app-name>
2. Deploy Application
Create deployment, service, and any required ConfigMaps/Secrets:
kubectl apply -f deployment.yaml -n <app-name>
kubectl apply -f service.yaml -n <app-name>
3. Create IngressRoute
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: <app-name>-route
namespace: <app-name>
spec:
entryPoints:
- websecure
routes:
- match: Host(`<app-name>.m3gatr0n.com`)
kind: Rule
services:
- name: <service-name>
port: <port>
4. Add Cloudflare Tunnel Route
mgt route add <app-name>.m3gatr0n.com
5. Create TLS Certificate (optional)
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: <app-name>-tls
namespace: <app-name>
spec:
secretName: <app-name>-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
dnsNames:
- <app-name>.m3gatr0n.com
6. Verify
curl -v https://<app-name>.m3gatr0n.com/
kubectl get pods -n <app-name>
kubectl get ingressroute -n <app-name>
See Add Cloudflare Route for detailed tunnel configuration.
TODO: expand with Helm-based deployment option, secret management via Vault, and CI/CD pipeline integration via Devtron.
Disaster Recovery
Procedures for recovering MEGATRON from major failures.
Severity Levels
| Level | Scenario | Recovery Time |
|---|---|---|
| 1 | Single pod crash | Minutes (auto-restart) |
| 2 | Node failure (worker) | 10-30 minutes (drain + rejoin) |
| 3 | Control plane failure | 30-60 minutes (K3s restart or etcd restore) |
| 4 | Full system failure | Hours (OS reinstall + K3s restore) |
| 5 | Hardware failure | Days (replacement + full restore) |
Emergency Access
If normal SSH is unresponsive:
# Rescue SSH (high priority, OOM protected)
ssh -p 2222 [email protected]
# Or via SSH config
ssh megatron-rescue
Level 3: Control Plane Recovery
# 1. SSH via rescue port
ssh megatron-rescue
# 2. Check K3s status
sudo systemctl status k3s
# 3. Restart K3s
sudo systemctl restart k3s
# 4. Wait for nodes to rejoin
kubectl get nodes -w
# 5. If etcd is corrupted, restore from snapshot
k3s server --cluster-reset --cluster-reset-restore-path=/var/lib/rancher/k3s/server/db/snapshots/<snapshot>
Level 4: Full System Recovery
- Reinstall Ubuntu 20.04 LTS
- Restore SSH keys from backup
- Install K3s:
curl -sfL https://get.k3s.io | sh - - Restore etcd from snapshot
- Rejoin worker nodes
- Restore Cloudflare tunnel config
- Verify all services
Critical Files to Preserve
| File/Directory | Purpose |
|---|---|
| /etc/cloudflared/ | Tunnel config and credentials |
| /var/lib/rancher/k3s/server/db/snapshots/ | K3s etcd snapshots |
| ~/.ssh/ | SSH keys |
| /etc/ssh/sshd_config_rescue | Rescue SSH config |
| ~/Papers/ | Research data (234 GB) |
TODO: expand with automated DR testing, RTO/RPO targets, and runbook for each severity level.