kubernetes: windows: kubectl port-forward does not work
What happened:
/sig windows
What you expected to happen:
kubectl port-forward will generate the follow error when using Windows pods:
curl http://127.0.0.1:40271
Handling connection for 40271
E0610 14:21:10.685551 124724 portforward.go:400] an error occurred forwarding 40271 -> 80: error forwarding port 80 to pod 40c9dc69b4d527427b72ebe4d8ea4a6a794fd7acc96c20373d0257439654f98f, uid : unable to do port forwarding: socat not found.
curl: (52) Empty reply from server
This issue does not appear when using Linux pods.
How to reproduce it (as minimally and precisely as possible):
Run the following commands:
kubectl create -f pods/portforward.yaml # https://paste.ubuntu.com/p/P8JQt7T8qk/
kubectl port-forward -n services-4435 pod/nodeport-test-6t4rs 9999:80 &
curl http://127.0.0.1:9999
The same scenario works when using Linux pods.
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version): master (v1.16.0) - Cloud provider or hardware configuration: N/A
- OS (e.g:
cat /etc/os-release): Windows Server Datacenter 10.0.17763.379 - Kernel (e.g.
uname -a): N/A - Install tools: N/A
- Network plugin and version (if this is a network-related bug): azure-vnet-cni, flannel
- Others:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 20 (18 by maintainers)
There is a PR Implement port forwarding for windows https://github.com/kubernetes/kubernetes/pull/75479.