Validate: kubectl exec/logs/port-forward through agentgateway (D6) #1535

Closed
opened 2026-08-13 23:22:43 +00:00 by ginjiruu · 1 comment
Owner

Validate: kubectl exec/logs/port-forward through agentgateway (D6)

Validation ticket for the hub architecture (#1532, decision D6). Confirms agentgateway forwards connection-upgraded traffic before the single-endpoint design commits to it.

Why this matters

kubectl exec, kubectl logs -f, kubectl port-forward, kubectl attach, and kubectl cp use connection upgrades (SPDY/WebSocket), not plain HTTPS request/response. agentgateway terminates the public TLS connection and forwards to the target apiserver over the WG fabric. If it cannot carry upgraded connections end-to-end, interactive/debug workflows break even though kubectl get works.

konnectivity (OCM) is not an alternative here: it only solves hub→spoke, not client→cluster (per the discussion that led to D6). The client→cluster upgrade path must work through agentgateway itself.

What to verify

  • Does agentgateway forward WebSocket and SPDY (HTTP/1.1 Upgrade) connections on the apiserver route without downgrade or buffering?
  • kubectl exec -it into a pod on each target cluster through the agentgateway endpoint
  • kubectl logs -f streaming
  • kubectl port-forward (long-running bidirectional stream)
  • kubectl attach / kubectl cp
  • Do both the machine flow (Kanidm SA token exchange) and human flow (kubelogin passthrough) survive upgrades? (ties to #1534 — dual-auth on one endpoint)
  • Timeouts/idle behavior on long-lived streams; does a proxy idle timeout kill exec sessions?
  • Does the upgrade carry through the RFC 8693 token exchange, or must exec requests bypass the exchange (impacts D5)?

Deliverables

  • Decision recorded on #1532 D6: upgrades supported / need upstream / use a second path for interactive traffic
  • If upstream-needed: link the agentgateway issue, set a revisit gate
  • #1532 (plan, D6)
  • #1534 (agentgateway dual-auth validation — the two must pass together for single-endpoint to work)
  • #1527 (agentgateway as edge research)
  • iac#28 (T13 — the L4 client access path)
## Validate: kubectl exec/logs/port-forward through agentgateway (D6) Validation ticket for the hub architecture (#1532, decision D6). Confirms agentgateway forwards connection-upgraded traffic before the single-endpoint design commits to it. ## Why this matters `kubectl exec`, `kubectl logs -f`, `kubectl port-forward`, `kubectl attach`, and `kubectl cp` use **connection upgrades** (SPDY/WebSocket), not plain HTTPS request/response. agentgateway terminates the public TLS connection and forwards to the target apiserver over the WG fabric. If it cannot carry upgraded connections end-to-end, interactive/debug workflows break even though `kubectl get` works. konnectivity (OCM) is not an alternative here: it only solves hub→spoke, not client→cluster (per the discussion that led to D6). The client→cluster upgrade path must work through agentgateway itself. ## What to verify - [ ] Does agentgateway forward WebSocket and SPDY (HTTP/1.1 Upgrade) connections on the apiserver route without downgrade or buffering? - [ ] `kubectl exec -it` into a pod on each target cluster through the agentgateway endpoint - [ ] `kubectl logs -f` streaming - [ ] `kubectl port-forward` (long-running bidirectional stream) - [ ] `kubectl attach` / `kubectl cp` - [ ] Do both the machine flow (Kanidm SA token exchange) and human flow (kubelogin passthrough) survive upgrades? (ties to #1534 — dual-auth on one endpoint) - [ ] Timeouts/idle behavior on long-lived streams; does a proxy idle timeout kill exec sessions? - [ ] Does the upgrade carry through the RFC 8693 token exchange, or must exec requests bypass the exchange (impacts D5)? ## Deliverables - [ ] Decision recorded on #1532 D6: upgrades supported / need upstream / use a second path for interactive traffic - [ ] If upstream-needed: link the agentgateway issue, set a revisit gate ## Related - #1532 (plan, D6) - #1534 (agentgateway dual-auth validation — the two must pass together for single-endpoint to work) - #1527 (agentgateway as edge research) - iac#28 (T13 — the L4 client access path)
Author
Owner

Validated: exec/logs/port-forward upgrades work through agentgateway.

  • Root cause: h2 to backend strips Upgrade: header -> apiserver 400 Upgrade required. Fix: backend.http.version: HTTP1 in k8s-hub/base/tls-policy.yaml (faa19b0c) -> gateway h1 to apiserver preserves Upgrade: SPDY/3.1 + X-Stream-Protocol-Version, apiserver 101.
  • Verified: kubectl --kubeconfig=/tmp/kubeconfig-mini.yaml exec ls / -> bin boot... 101, logs, port-forward 8080->80 200, all via TokenExchange and via OIDC passthrough (both flows).
  • H2 Extended CONNECT (RFC8441) would regain h2 multiplexing for watches but not manifest-manageable yet (pool v0.1.11 fix not in gateway 1.5.0, no appProtocol for static Backend). Tracked as #1590. Keep HTTP1 for now.
Validated: exec/logs/port-forward upgrades work through agentgateway. - Root cause: h2 to backend strips Upgrade: header -> apiserver 400 Upgrade required. Fix: backend.http.version: HTTP1 in k8s-hub/base/tls-policy.yaml (faa19b0c) -> gateway h1 to apiserver preserves Upgrade: SPDY/3.1 + X-Stream-Protocol-Version, apiserver 101. - Verified: kubectl --kubeconfig=/tmp/kubeconfig-mini.yaml exec ls / -> bin boot... 101, logs, port-forward 8080->80 200, all via TokenExchange and via OIDC passthrough (both flows). - H2 Extended CONNECT (RFC8441) would regain h2 multiplexing for watches but not manifest-manageable yet (pool v0.1.11 fix not in gateway 1.5.0, no appProtocol for static Backend). Tracked as #1590. Keep HTTP1 for now.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/clusters#1535
No description provided.