Cilium 1.20 renders ONE RouteConfiguration per Gateway, shared by every listener of that Gateway. Two routes that both match `Prefix: /` with no hostnames are merged into a single route with `weightedClusters` 1/1, so a second bare-IP route on the `internal` gateway (even on a second port) makes BOTH services random: measured 12 requests each to :8081 and :8082 returning Grafana 7x and Hubble UI 5x. Splitting by port does not help. Hubble UI therefore gets its own Gateway (`internal/hubble-ui`, listener http-internal on 8082, own RouteConfiguration) and its route has no hostnames, so `http://10.10.0.2:8082/` and `http://hubble.lab.internal:8082/` both serve the UI while Grafana keeps :8081 to itself. Documented as the rule in gateway.yaml: one bare-IP service per Gateway.
28 lines
974 B
YAML
28 lines
974 B
YAML
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: hubble-ui
|
|
namespace: kube-system
|
|
labels:
|
|
app.kubernetes.io/name: hubble-ui
|
|
app.kubernetes.io/part-of: cilium
|
|
spec:
|
|
parentRefs:
|
|
# Dedicated Gateway on port 8082 — deliberately NOT the shared `internal`
|
|
# gateway. There is no `hostnames` field here on purpose: the route must
|
|
# match a request whose Host header is the bare IP (10.10.0.2:8082), which
|
|
# is the only form a phone can use. Cilium merges hostname-less routes that
|
|
# share a Gateway into one 50/50 weighted route, so a bare-IP service needs
|
|
# its own Gateway as well as its own port.
|
|
- name: hubble-ui
|
|
namespace: internal
|
|
sectionName: http-internal
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
backendRefs:
|
|
# hubble-ui Service (frontend nginx, which proxies /api to the backend)
|
|
- name: hubble-ui
|
|
port: 80
|