[v18] Fix kube port-forward to exit on pod removal#57738
Merged
rana merged 1 commit intobranch/v18from Aug 11, 2025
Merged
Conversation
creack
approved these changes
Aug 9, 2025
`kubectl port-forward` now exits when a pod disconnects. This addresses `kubectl` user expectations that the Teleport Kubernetes proxy behave transparently, and identical to direct-to-Kubernetes. - Changed error stream copying to uni-directional (target -> source) in SPDY and WebSocket `forwardStreamPair()` functions - Added `WaitGroup` to SPDY `run()` enabling all port-forward streams to fully complete before returning - Added an integration test for Kubernetes port-forwarding with pod disconnection - Updated existing port-forward integration tests to allow and expect `ErrLostConnectionToPod` Fixes #54814
ee64819 to
b081795
Compare
tigrato
approved these changes
Aug 11, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #57051 to branch/v18
changelog: Kubernetes Access:
kubectl port-forwardnow exits cleanly when backend pods are removed