Operator addendum: internal services must be reachable by bare IP+port, because
a phone cannot edit /etc/hosts. A hostname-scoped route does not match
Host: 10.10.0.2:8081 (Envoy 404), and a hostname-less PathPrefix / cannot share
a listener with it — so hubble-ui gets its own listener on 8082
with a route that sets no hostnames. and
both hit the UI.
Firewall: siriussec nft table now matches dport { 8081, 8082 } and starts with
so re-running the unit replaces (not appends) the rules; the rpi
ufw script is generalised to a PORTS list and inserts each port above the LAN
catch-all. Both hosts applied and verified before the listener was programmed.
docs: internal gateway section, host-firewall README.
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: Gateway
|
|
metadata:
|
|
name: internal
|
|
namespace: internal
|
|
labels:
|
|
dedicated: network
|
|
spec:
|
|
gatewayClassName: cilium
|
|
listeners:
|
|
- name: http-internal
|
|
protocol: HTTP
|
|
port: 8081
|
|
# Any namespace may attach a route: the security boundary for this listener
|
|
# is the HOST firewall (only 10.10.0.0/24 + pod CIDR may reach :8081), not
|
|
# the namespace. Keeps the pattern reusable for the next internal service
|
|
# (Hubble lives in kube-system) without editing this Gateway again.
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: All
|
|
# One listener per service that must be reachable by BARE IP.
|
|
#
|
|
# A hostname-scoped route (`hostnames: [x.lab.internal]`) does not match a
|
|
# request whose Host is the IP, so `curl http://10.10.0.2:8081/` returns 404
|
|
# and a phone (no /etc/hosts) cannot use the service at all. The fix is a
|
|
# listener whose route has no `hostnames` — but a hostname-less PathPrefix /
|
|
# route swallows every request on its listener, so it cannot share a port
|
|
# with a hostname-routed one. Hence: new service => new port.
|
|
- name: hubble-ui
|
|
protocol: HTTP
|
|
port: 8082
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: All
|