From 39d707236c95fd98c5f720fb92851cb6b5985a40 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Tue, 27 Oct 2026 00:51:43 -0400 Subject: [PATCH] docs: Hubble UI on 8084, verified end-to-end by bare IP; correct the 8084 comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - internal-wireguard-services §10: Hubble verification log (HR Ready, rendered hubble.metrics list, relay connected to all 3 agents, 23/23 scrape targets up, flow/drop/TCP/ICMP/PolicyVerdict counters non-zero, headless-browser service map with 64.7 flows/s and 3/3 nodes, LAN + internet negatives, regression). Records the port cycle: 8082 is held on rpi by the leftover handyman-site Docker container (and 8083 by its nginx), so the listener must be checked free on EVERY cilium-envoy node, and notes that only 10.10.0.2 answers (Envoy on a node without the backend 503s after 5s). - gateway-hubble-ui.yaml: stop asserting a bind error for 8084 — 8084 was verified free on both nodes and binds; the comment now explains the rule without claiming a false fact. - cluster-overview: internal gateway section + namespaces (monitoring, hubble pods, the second gateway). --- docs/cluster-overview.md | 7 +- docs/internal-wireguard-services.md | 76 +++++++++++++++++++ .../internal/gateway-hubble-ui.yaml | 6 +- 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/docs/cluster-overview.md b/docs/cluster-overview.md index 3061746..d4fe4a8 100644 --- a/docs/cluster-overview.md +++ b/docs/cluster-overview.md @@ -282,7 +282,7 @@ A single `ReferenceGrant` exists (`gateway-system/forgejo`) for the cross-namesp ### 4.6 Second gateway: `internal` -`internal/internal` (namespace `internal`) is a Cilium Gateway on **port 8081**, `allowedRoutes: All`, with no tunnel mapping. It carries the WireGuard-only services — currently **Grafana** (`http://grafana.lab.internal:8081/`) and **Hubble UI** (`http://hubble.lab.internal:8081/`). The enforcement point is the *host* firewall on both gateway nodes (nft `table inet internal_gw` on siriussec, ufw rules above the LAN catch-all on rpi), not the Gateway: a listener port is reachable on every node address the moment it is Programmed. Full pattern, negative tests and the add-next-service recipe: `docs/internal-wireguard-services.md`. +`internal/internal` (namespace `internal`) and `internal/hubble-ui` are Cilium Gateways on **port 8081** and **8084**, `allowedRoutes: All`, with no tunnel mapping. It carries the WireGuard-only services. Both are reachable **by bare IP** (phones cannot edit `/etc/hosts`): **Grafana** `http://10.10.0.2:8081/` and **Hubble UI** `http://10.10.0.2:8084/`; the named URLs (`grafana.lab.internal`, `hubble.lab.internal`) are laptop conveniences only. Hubble UI has its own `Gateway internal/hubble-ui` because Cilium merges hostname-less routes that share a Gateway. The enforcement point is the *host* firewall on both gateway nodes (nft `table inet internal_gw` on siriussec, ufw rules above the LAN catch-all on rpi), not the Gateway: a listener port is reachable on every node address the moment it is Programmed. Full pattern, negative tests and the add-next-service recipe: `docs/internal-wireguard-services.md`. Neither hostname is in the cloudflared ingress list, and `*.lab.internal` resolves nowhere public — `Host: .lab.internal` on the public gateway (`10.10.0.2:8080`) answers **404**. @@ -359,13 +359,14 @@ Nothing runs on `linode` except its Cilium agent. `rpi` runs only the two runner | Namespace | Age | Contents | |---|---|---| -| `kube-system` | 45 d | control plane, Cilium, Envoy, CoreDNS | +| `kube-system` | 45 d | control plane, Cilium, Envoy, CoreDNS, hubble-relay + hubble-ui | | `kube-public`, `kube-node-lease`, `default` | 45 d | kubeadm defaults | | `forgejo` | 45 d | Forgejo, its CNPG cluster, 3 runners, prune CronJob | | `cnpg-system` | 45 d | CloudNativePG operator | +| `monitoring` | 1 d | kube-prometheus-stack: Prometheus (7d/8GB), Grafana, kube-state-metrics, node-exporter | | `flux-system` | 41 d | 4 Flux controllers, GitRepository, 4 Kustomizations | | `gateway-system` | 45 d | Gateway `public` | -| `internal` | 41 d | Gateway `internal` | +| `internal` | 41 d | Gateways `internal` (8081) and `hubble-ui` (8084) | | `local-path-storage` | 45 d | provisioner | | `siriusdevops` | 43 d | site + contact | | `piedmont` | 26 d | site + contact | diff --git a/docs/internal-wireguard-services.md b/docs/internal-wireguard-services.md index 5279a07..1c79f50 100644 --- a/docs/internal-wireguard-services.md +++ b/docs/internal-wireguard-services.md @@ -337,3 +337,79 @@ A1NSWT7K9Dz…("Peer SiriusMobile", 10.10.0.4) age=570919s (~6.6 days) **The URL to use on the phone: `http://10.10.0.2:8081/`** — tunnel connected, client `AllowedIPs` covering `10.10.0.0/24`. +## 10. Verification log — 2026-10-27 (Hubble UI on `http://10.10.0.2:8084/`) + +Hubble relay + UI are chart values in `infrastructure/networking/cilium/values.yaml` +(`hubble.relay.enabled`, `hubble.ui.enabled`, both pinned to siriussec); the UI +is exposed by `internal/hubble-ui` (port **8084**, own Gateway, no `hostnames`). + +**Port choice cost a cycle.** The first attempt used 8082, which is free on +siriussec but held on **rpi** by the leftover `handyman-site` Docker container +(`127.0.0.1:8082`; its nginx holds `127.0.0.1:8083`). Cilium binds the listener +`0.0.0.0:8082` on *both* gateway nodes, so rpi's Envoy rejected the config +(`cannot bind '0.0.0.0:8082': Address already in use`, ~640 lines/s) and +restart-looped the node that fronts the public ingress. 8084 was verified free +on both nodes before the move. **Check `ss -lntH "sport = :" | wc -l` = 0 +on every node with `k8s-app=cilium-envoy`, not just the control-plane.** + +``` +# values -> rendered config (not a guess) +$ kubectl -n kube-system get hr cilium -o jsonpath='{.status.conditions[?(@.type=="Ready")].status} {.status.lastAttemptedRevision}' +True 1.20.1 # Ready=True +$ kubectl -n kube-system get cm cilium-values-* -o jsonpath='{.data.values\.yaml}' | grep -A2 ' relay:' + relay: {enabled: true, replicas: 1, nodeSelector: {kubernetes.io/hostname: siriussec}} +$ kubectl -n kube-system get cm cilium-config -o jsonpath='{.data.hubble-metrics}' +flow drop tcp port-distribution icmp httpV2 dns # + hubble-metrics-server :9965 + +$ kubectl -n kube-system get pods | grep -E 'hubble' +hubble-relay-6f87554656-wznnw 1/1 Running +hubble-ui-567ccf4fbd-skkwm 2/2 Running +$ kubectl -n kube-system logs deploy/hubble-relay --tail=3 +msg=Connecting address=10.10.0.1:4244 tls=true peer=rpi +msg=Connected address=10.10.0.2:4244 tls=true peer=siriussec +msg=Connected address=10.10.0.5:4244 tls=true peer=linode + +# scrape targets (Prometheus CR selects label release=kube-prometheus-stack) +serviceMonitor/kube-system/hubble/0 up 10.10.0.1:9965 / 10.10.0.2:9965 / 10.10.0.5:9965 +serviceMonitor/kube-system/hubble-relay/0 up 10.244.0.75:9966 +serviceMonitor/kube-system/cilium-operator/0 up 10.10.0.2:9963 +23 active targets, 23 up / 0 down (was 18/18 before this card) + +# flows are real (Prometheus) +hubble_flows_processed_total = 4586 hubble_drop_total = 8 +hubble_tcp_flags_total = 1471 hubble_icmp_total = 36 +hubble_flows_processed_total{type="PolicyVerdict"} = 178 # policy-verdict data +hubble_http_requests_total = 281 +# relay's own view: hubble_relay_pool_peer_connection_status{status="READY"} = 3 + +# PHONE PATH — bare IP, no hosts entry, no Host header (from Legion) +$ curl -sS -o /dev/null -w '%{http_code}' http://10.10.0.2:8084/ -> 200 +$ curl -sS http://10.10.0.2:8084/ | grep -o '.*' -> Hubble UI +$ curl -sS -o /dev/null -w '%{http_code}' http://10.10.0.2:8081/ -> 302 (Grafana, unbroken) + +# the UI actually works, not just its shell: headless Chromium against the bare IP +# /?namespace=kube-system -> service map rendered, status dot green, +# "64.7 flows/s", "3/3 nodes", flow table populated +# backend log: GetEventsRequest parsed (ServiceMapStream) + watcher is running +# (ControlStream) -> hubble-relay:80, FlowStream streaming +$ kubectl -n kube-system logs deploy/hubble-ui -c backend --tail=2 | grep -c Stream +2 + +# negative 1 — LAN (from Legion, 192.168.1.0/24) +$ curl -m 3 http://192.168.1.179:8084/ -> 000 (timeout) # siriussec nft +$ curl -m 3 http://192.168.1.125:8084/ -> 000 (timeout) # rpi ufw +# negative 2 — internet: no hubble/lab.internal entry in the cloudflared ingress +# (9 hostnames, all public sites), and no tunnel points at 8084. +# regression: forgejo.siriusdevops.com -> 200 through the tunnel; Grafana 302. + +# envoy health after the move +kubectl -n kube-system get pods -l k8s-app=cilium-envoy # both 1/1, RESTARTS 0 +logs --since=60s | grep -c 'cannot bind' # 0 +``` + +**Only `10.10.0.2` answers.** `10.10.0.1:8081` and `10.10.0.1:8084` both return +**503 after exactly 5 s from rpi itself** and time out over the mesh — Envoy on a +node that does not run the backend completes the TCP handshake and never ACKs +(the same co-location fault as the public gateway). The Gateway status lists +both node addresses because the class schedules on every `gateway=true` node; +the working address is the one the backends are pinned to, `10.10.0.2`. diff --git a/infrastructure/networking/internal/gateway-hubble-ui.yaml b/infrastructure/networking/internal/gateway-hubble-ui.yaml index 187cc0f..c549f62 100644 --- a/infrastructure/networking/internal/gateway-hubble-ui.yaml +++ b/infrastructure/networking/internal/gateway-hubble-ui.yaml @@ -21,9 +21,9 @@ spec: # siriussec 10.10.0.2 — `kubectl -n kube-system get pods -l # k8s-app=cilium-envoy -o wide`). Cilium binds 0.0.0.0: hostNetwork on # all of them, so a port already held by anything else on ANY gateway node - # makes xDS reject the listener there ("cannot bind '0.0.0.0:8084': Address - # already in use") and crashloops that node's Envoy — which fronts the - # public ingress. The Pi still runs leftover Docker site containers: + # makes xDS reject the listener there ("cannot bind '0.0.0.0:': + # Address already in use") and restart-loops that node's Envoy — which + # fronts the public ingress. The Pi still runs leftover Docker site containers: # handyman-site holds 127.0.0.1:8082 and its nginx holds 127.0.0.1:8083, so # both are unusable here (a 127.0.0.1 bind still conflicts with 0.0.0.0). # Check per node before choosing: `ss -lntH "sport = :" | wc -l` = 0.