Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: kubectl port-forward does not work #78857

Closed
bclau opened this issue Jun 10, 2019 · 6 comments

Comments

6 participants
@bclau
Copy link
Contributor

commented Jun 10, 2019

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:
@pswica

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

The command actually tells you:

Forward one or more local ports to a pod. This command requires the node to have 'socat' installed

I would label this as:

/kind feature
/remove-kind bug

@k8s-ci-robot k8s-ci-robot added kind/feature and removed kind/bug labels Jun 10, 2019

@zhiweiv

This comment has been minimized.

Copy link

commented Jun 11, 2019

There is a PR Implement port forwarding for windows #75479.

@yujuhong

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

The PR has already been merged, pending moving the pause image to a repo owned by sig-windows (and maybe push an official pause image with this feature?)
/assign @benmoss

@benmoss

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

https://asciinema.org/a/94FUya91IyRLnrhCrUBZo3zMk

it looks from the error like you're not actually running a kubelet with the changes in my PR. it would error with not finding wincat, not socat.

@benmoss

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

/close

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2019

@benmoss: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

SIG-Windows automation moved this from Backlog to Done (v1.16) Jun 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.