T13: kubeconfig distribution & connectivity architecture (kubectl access) #28
Labels
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/iac#28
Loading…
Add table
Add a link
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?
T13: kubeconfig distribution & connectivity architecture (kubectl access)
Context
Users need kubectl access to clusters. Two problems: how users learn which clusters exist (discovery), and how bytes reach the apiserver (connectivity). This ticket records the chosen architecture — the design is still being hashed out, so it will be refined as implementation questions get answered.
Architecture
Connectivity
https://<cluster>.k8s.animeteamspeak.moeover normal HTTPS. No VPN — external runners can't rely on kernel modules (WireGuard).gateway/cilium-defaulton portable) with the authz-bridgeExternalAuthflow — it terminates TLS (Let's Encrypt) and exchanges the bearer's Kanidm SA API token per request (audience = the cluster's apiserver client, e.g.minicluster; scopesopenid groups_name; the exchanged id_token is forwarded), so the apiserver sees a fresh token and the kubeconfig holds no short-lived credential. This replaces the earlier "TLS passthrough / HTTPRoute" sketch for the machine path.<cluster>.k8s.animeteamspeak.moe) points at the relay/gateway.AuthN/Z
kanidm-login.py-style) — kubeconfigs carry no static credentials; the token is minted at runtime from kanidm.group-<app>-<capability>). Machines = humans: kanidm service accounts + RFC 8693 token exchange.Discovery / distribution
switchcommand). Portal API is the endgame, not now.Where this lives
This spans repos — most belongs in its own repo (kubeconfig distribution + tunnel orchestration), while the apiserver flags side is flux-clusters #11. The k8s-hub data plane lives on portable (managed via flux-clusters
generic-templates/k8s-hub) tracked via #38 (#39 resolved). (Originally agentgateway on mini; migrated to the Cilium Gateway API in 2026-09.)Open questions (to answer while implementing)
agentgateway placement/TLS certs for the apiserver routes (depends on #39 unblocking)— #39 resolved (2026-08-12): the exchange is verified; placement/certs is now implementation work (Gate-2 in #38).Cross-link from the edge-ingress research (flux-clusters #1527): the portable↔mini connectivity path is now being built with Cilium ClusterMesh (flux-clusters #1528), which complements — not replaces — the reverse-tunnel plan here.
Key overlap: with the mesh up, an agentgateway running in portable (edge) can reach mini's apiserver token-exchange routes (RFC 8693, per lab/iac#38) as a normal local Service backend via Global Services, no new VIPs needed. That collapses the "which cluster holds the apiserver agentgateway" question: the edge agentgateway in portable can front the mini apiserver directly.
Two caveats to carry forward into #28's design: