{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57320","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57320/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57320/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57320/events","html_url":"https://github.com/kubernetes/kubernetes/pull/57320","id":282837059,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU4ODgyNTM0","number":57320,"title":"WIP: add kubectl reverse port forwarding","user":{"login":"vfreex","id":9941773,"node_id":"MDQ6VXNlcjk5NDE3NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/9941773?v=4","gravatar_id":"","url":"https://api.github.com/users/vfreex","html_url":"https://github.com/vfreex","followers_url":"https://api.github.com/users/vfreex/followers","following_url":"https://api.github.com/users/vfreex/following{/other_user}","gists_url":"https://api.github.com/users/vfreex/gists{/gist_id}","starred_url":"https://api.github.com/users/vfreex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfreex/subscriptions","organizations_url":"https://api.github.com/users/vfreex/orgs","repos_url":"https://api.github.com/users/vfreex/repos","events_url":"https://api.github.com/users/vfreex/events{/privacy}","received_events_url":"https://api.github.com/users/vfreex/received_events","type":"User","site_admin":false},"labels":[{"id":138247961,"node_id":"MDU6TGFiZWwxMzgyNDc5NjE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/kubectl","name":"area/kubectl","color":"0052cc","default":false},{"id":116719829,"node_id":"MDU6TGFiZWwxMTY3MTk4Mjk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/kubelet","name":"area/kubelet","color":"0052cc","default":false},{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":687500047,"node_id":"MDU6TGFiZWw2ODc1MDAwNDc=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/do-not-merge/work-in-progress","name":"do-not-merge/work-in-progress","color":"e11d21","default":false},{"id":261005360,"node_id":"MDU6TGFiZWwyNjEwMDUzNjA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/api-change","name":"kind/api-change","color":"e11d21","default":false},{"id":267761362,"node_id":"MDU6TGFiZWwyNjc3NjEzNjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/feature","name":"kind/feature","color":"c7def8","default":false},{"id":240247879,"node_id":"MDU6TGFiZWwyNDAyNDc4Nzk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","default":false},{"id":200149833,"node_id":"MDU6TGFiZWwyMDAxNDk4MzM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":173493835,"node_id":"MDU6TGFiZWwxNzM0OTM4MzU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false},{"id":404091735,"node_id":"MDU6TGFiZWw0MDQwOTE3MzU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/apps","name":"sig/apps","color":"d2b48c","default":false},{"id":636152047,"node_id":"MDU6TGFiZWw2MzYxNTIwNDc=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/architecture","name":"sig/architecture","color":"d2b48c","default":false},{"id":450823910,"node_id":"MDU6TGFiZWw0NTA4MjM5MTA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cli","name":"sig/cli","color":"d2b48c","default":false},{"id":116712108,"node_id":"MDU6TGFiZWwxMTY3MTIxMDg=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/network","name":"sig/network","color":"d2b48c","default":false},{"id":173493665,"node_id":"MDU6TGFiZWwxNzM0OTM2NjU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/node","name":"sig/node","color":"d2b48c","default":false},{"id":253451057,"node_id":"MDU6TGFiZWwyNTM0NTEwNTc=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500","default":false}],"state":"open","locked":false,"assignee":{"login":"dshulyak","id":1964576,"node_id":"MDQ6VXNlcjE5NjQ1NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1964576?v=4","gravatar_id":"","url":"https://api.github.com/users/dshulyak","html_url":"https://github.com/dshulyak","followers_url":"https://api.github.com/users/dshulyak/followers","following_url":"https://api.github.com/users/dshulyak/following{/other_user}","gists_url":"https://api.github.com/users/dshulyak/gists{/gist_id}","starred_url":"https://api.github.com/users/dshulyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshulyak/subscriptions","organizations_url":"https://api.github.com/users/dshulyak/orgs","repos_url":"https://api.github.com/users/dshulyak/repos","events_url":"https://api.github.com/users/dshulyak/events{/privacy}","received_events_url":"https://api.github.com/users/dshulyak/received_events","type":"User","site_admin":false},"assignees":[{"login":"dshulyak","id":1964576,"node_id":"MDQ6VXNlcjE5NjQ1NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1964576?v=4","gravatar_id":"","url":"https://api.github.com/users/dshulyak","html_url":"https://github.com/dshulyak","followers_url":"https://api.github.com/users/dshulyak/followers","following_url":"https://api.github.com/users/dshulyak/following{/other_user}","gists_url":"https://api.github.com/users/dshulyak/gists{/gist_id}","starred_url":"https://api.github.com/users/dshulyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshulyak/subscriptions","organizations_url":"https://api.github.com/users/dshulyak/orgs","repos_url":"https://api.github.com/users/dshulyak/repos","events_url":"https://api.github.com/users/dshulyak/events{/privacy}","received_events_url":"https://api.github.com/users/dshulyak/received_events","type":"User","site_admin":false},{"login":"shiywang","id":6284003,"node_id":"MDQ6VXNlcjYyODQwMDM=","avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2017-12-18T10:51:23Z","updated_at":"2018-09-10T14:39:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57320","html_url":"https://github.com/kubernetes/kubernetes/pull/57320","diff_url":"https://github.com/kubernetes/kubernetes/pull/57320.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/57320.patch"},"body":"\r\n\r\n\r\n<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/devel/pull-requests.md#write-release-notes-if-needed\r\n4. If the PR is unfinished, see how to mark it: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nThis adds remote port forwarding feature to kubectl and\r\nkubelet, which means users are able to make a request to a Pod port,\r\nand the request will be forwarded to a local port on the machine running\r\n`kubectl`. \r\nMore information is described in #20227.\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #20227\r\n\r\n**Special notes for your reviewer**:\r\nCurrently, this PR only covers the `kubectl` part:\r\nA new argument `--remote/-r` is introduced to `port-forward`\r\nsubcommand. \r\n\r\nFor example, if you want to open a listening port `8080` on\r\nthe Pod that forwards to port `80` on the local machine, you should run\r\n`kubectl port-forward --remote $POD_NAME 8080:80`.\r\n\r\nThis is a draft implementation over SPDY tunnels to show it is feasible.\r\nPlease help review if this feature and the command line syntax is\r\nreasonable.\r\n\r\nFollowing describes the design of this feature. I'll open a KEP to kubernetes/community for elaborating more details.\r\n1. Whenever a user requests a remote port forwarding, a pair of SPDY channels are established to kubelet. This step is similar to what existing (local) port forwarding function does. The `error` channel is used to transfer error messages between client and server, while the `data` channel is for heartbeats.\r\n2. A Unix domain socket listener is started and waits for connections from the forwarded pod.\r\n3. A `socat` process is started and attached to the network namespace of the forwarded pod. The socat process listens on a TCP port of the pod, and any TCP connections made to the port is forwarded to the Unix domain socket.\r\n4. Whenever the Unix domain socket listener receives a new connection, a new pair of SPDY channels will be initiated to `kubectl`.\r\n5. Whenever a new channel request is received on the client side,  `kubectl` accepts the channels and opens a new TCP connection to the specified `local port`, and forwards traffic between the local port and the `data` channel of the channel pair.\r\n6. When kubelet receives no more heartbeats, the Unix domain socket listener and the `socat` process will be stopped.\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nkubectl port-forward Pod ports to local ports\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/419937107","html_url":"https://github.com/kubernetes/kubernetes/pull/57320#issuecomment-419937107","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57320","id":419937107,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTkzNzEwNw==","user":{"login":"k8s-ci-robot","id":20407524,"node_id":"MDQ6VXNlcjIwNDA3NTI0","avatar_url":"https://avatars0.githubusercontent.com/u/20407524?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-ci-robot","html_url":"https://github.com/k8s-ci-robot","followers_url":"https://api.github.com/users/k8s-ci-robot/followers","following_url":"https://api.github.com/users/k8s-ci-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-ci-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-ci-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-ci-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-ci-robot/orgs","repos_url":"https://api.github.com/users/k8s-ci-robot/repos","events_url":"https://api.github.com/users/k8s-ci-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-ci-robot/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T14:39:09Z","updated_at":"2018-09-10T14:39:09Z","author_association":"NONE","body":"@vfreex: The following tests **failed**, say `/retest` to rerun them all:\n\nTest name | Commit | Details | Rerun command\n--- | --- | --- | ---\npull-kubernetes-bazel-build | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-bazel-build/57608/) | `/test pull-kubernetes-bazel-build`\npull-kubernetes-bazel-test | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-bazel-test/60169/) | `/test pull-kubernetes-bazel-test`\npull-kubernetes-integration | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-integration/27274/) | `/test pull-kubernetes-integration`\npull-kubernetes-local-e2e-containerized | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-local-e2e-containerized/2615/) | `/test pull-kubernetes-local-e2e-containerized`\npull-kubernetes-e2e-kops-aws | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-e2e-kops-aws/105654/) | `/test pull-kubernetes-e2e-kops-aws`\npull-kubernetes-e2e-gce | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-e2e-gce/52339/) | `/test pull-kubernetes-e2e-gce`\npull-kubernetes-e2e-gce-device-plugin-gpu | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-e2e-gce-device-plugin-gpu/47473/) | `/test pull-kubernetes-e2e-gce-device-plugin-gpu`\npull-kubernetes-e2e-gce-100-performance | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-e2e-gce-100-performance/19875/) | `/test pull-kubernetes-e2e-gce-100-performance`\npull-kubernetes-kubemark-e2e-gce-big | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-kubemark-e2e-gce-big/21886/) | `/test pull-kubernetes-kubemark-e2e-gce-big`\npull-kubernetes-typecheck | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-typecheck/24394/) | `/test pull-kubernetes-typecheck`\npull-kubernetes-verify | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-verify/106280/) | `/test pull-kubernetes-verify`\npull-kubernetes-node-e2e | 4ee5242172682f74f096d51a5df1478963e80625 | [link](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/57320/pull-kubernetes-node-e2e/104107/) | `/test pull-kubernetes-node-e2e`\n\n[Full PR test history](https://k8s-gubernator.appspot.com/pr/57320). [Your PR dashboard](https://k8s-gubernator.appspot.com/pr/vfreex). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes/kubernetes/issues?q=is:issue+is:open) when you hit one in your PR.\n\n<details>\n\nInstructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).\n</details>\n<!-- test report -->"}}
{"actor":{"display_login":"k8s-ci-robot"}}