Implement Cilium ClusterMesh between portable and mini (Global Services) #1528
Labels
No labels
epic
fleet:hub
fleet:identity
fleet:ingress
fleet:offload
fleet:sveltos
needs-triage
ready-for-agent
ready-for-human
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/clusters#1528
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement Cilium ClusterMesh between portable and mini (Global Services)
Cross-cluster routing for the "single-pod app on a non-internet-connected cluster" problem from #1527, using the ClusterMesh feature all clusters already run Cilium for. Goal: agentgateway (edge, in portable) routes to mini apps as ordinary local Service backends, dropping haproxy's static per-SNI backend entries to
10.10.6.x.Deployed Cilium state (current, cross-referenced)
routingMode: nativeroutingMode: nativetype: wireguard10.44.0.0/1610.42.0.0/1610.0.0.0/810.42.0.0/1610.10.6.0/2410.10.5.0/24Both Cilium installs are HelmReleases pinned to
1.19.6(mini viaclusters/mini/cilium/values; portable via inlineclusters/portable/cilium/helmRelease.yaml).localhost(dev, gatewayAPI on) is out of scope for v1.Prerequisites check (against docs.cilium.io cluster-mesh/setup)
10.44.0.0/16, portable10.42.0.0/16. ✅ no overlap.10.10.6.x, portable10.10.5.x, both BGP-peered to10.15.1.1(lab-erx-01). L3 path exists via edge router; must be verified for pod IPs.ipv4NativeRoutingCIDRmust cover all PodCIDRs across all mesh clusters. mini is/8(covers both). portable is10.42.0.0/16— does NOT cover mini's10.44.0.0/16. Portable must be widened to10.0.0.0/8.encryption: {enabled: true, type: wireguard}. Firewall: UDP51871open between all mesh nodes.maxConnectedClusters— default 255 is fine for 2 clusters; leave unset.Changes to implement
cluster.name/cluster.idon both HelmReleases (mini: e.g.cluster.name: mini,cluster.id: 1; portable:cluster.name: portable,cluster.id: 2). Changing these later requires restarting all workloads.ipv4NativeRoutingCIDRto10.0.0.0/8.clustermesh.enabled: trueclustermesh.apiserver.service.type: LoadBalancer(both clusters BGP-advertise LB VIPs: portable10.10.5.x, mini10.10.6.x; verified reachable cross-cluster via edge router)cilium clustermesh connectin one direction establishes both. Validate withcilium connectivity test --multi-cluster.mini_kgateway, e.g. media, search, cloud, photos, ai, agentvault, supernote, etc.).Load-balancing & service discovery choice
Docs (load-balancing/) offer two mechanisms:
service.cilium.io/global: "true". No CoreDNS dependency. Simplest for this repo's hand-managed Services. Recommended.ServiceExport/ServiceImport, requires CoreDNS ≥ 1.12.2 (K8s 1.35+) withclusterset.local, orclustermesh.mcsapi.corednsAutoConfigure. Higher-level but more moving parts.agentgateway does not support GEP-1748 (ServiceImport backendRef — documented as unsupported), so the route is: agentgateway → plain
Servicebackend → Global Service whose remote endpoints Cilium merges in. Global Services create a real Service object in each cluster, so agentgateway needs no GEP-1748 support. If EndpointSlice-based third-party controllers were needed,clustermesh.enableEndpointSliceSynchronization(beta) is the fallback — not needed for the agentgateway path.For the single-pod apps (one backend in mini), set
service.cilium.io/affinity: "local"on the Service in mini (keeps mini's pods local-preferred) — or omit affinity for the default "any cluster" behavior.Security policies (docs: policy/)
io.cilium.k8s.policy.cluster: <name>(or amatchExpressionsExistsfor "any cluster"). ExistingCiliumNetworkPolicy/NetworkPolicymust be audited once mesh is up or cross-cluster traffic may be silently blocked by default-deny.clustermesh.cacheTTL(default0s= never revoke). Consider15mso a down mini stops receiving traffic.Relationship to haproxy retirement and #1527
After the mesh is up, haproxy's
mini_kgateway_tcpbackends (10.10.6.9:443) andmini.mapfan-out can be replaced by agentgateway routing to the Global Services. haproxy itself stays as the internet-facing L4 edge until agentgateway's OIDC web login lands upstream (agentgateway/agentgateway#1450). This is the enabler for the "all in on agentgateway" end state.Integration with existing work
Acceptance criteria
cilium clustermesh statuson both clusters shows all nodes connectedcilium connectivity test --multi-clusterpassesmini_*SNI entryBlocked by
Follow-up question (captured for later)
Egress Gateway is documented as not compatible with Cluster Mesh — the egress gateway node must be in the same cluster as the selected pods, and the two features cannot be combined. Keep egress policies per-cluster or route external-destined traffic through a central gateway outside the fabric. See egress-gateway docs.
Terminology correction (agentgateway → current architecture). The edge is no longer agentgateway — it's Cilium Gateway API (
gateway/cilium-default), and haproxy is already removed. agentgateway is now AI-only.So in this ticket:
Now tracked under lab/clusters#1668. Portable is the think cluster. Before enabling ClusterMesh both clusters need unique Cilium
cluster-name/cluster-id(both aredefault/0 today); think gets them at its planned rebuild (lab/machine-configs, see lab/machine-configs#7).