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

add new plugin proxy-port-forward #3387

Closed
wants to merge 1 commit into from

Conversation

kvaps
Copy link
Member

@kvaps kvaps commented Sep 28, 2023

A new plugin from kubectl node-shell developer (me).
Might be useful for local development, when you need to proxy multiple services including external ones.

@ahmetb
Copy link
Member

ahmetb commented Sep 28, 2023

🤖 Beep beep! I’m a robot speaking on behalf of @ahmetb. 🤖


Thanks for submitting your kubectl plugin to Krew!
One of the krew-index maintainers will review it soon. Note that the reviews for new plugin submissions may take a few days.

In the meanwhile, here are a few tips to make your plugin manifest better:

  • Make sure your plugin follows the best practices.
  • Eliminate redundant wording form shortDescription (it should be max 50 characters).
  • Try to word wrap your description to 80-character lines (no usage examples, please).

Thanks for your patience!
/kind new-plugin

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/new-plugin labels Sep 28, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kvaps
Once this PR has been reviewed and has the lgtm label, please assign ahmetb for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 28, 2023
Comment on lines +12 to +17
Usage:
$ kubectl proxy-port-forward <local_port>:<remote_host>:<remote_port> [<local_port>:<remote_host>:<remote_port>]

Example:
$ kubectl proxy-port-forward 8443:google.com:443 6443:kubernetes.default.svc:443
$ curl -k https://localhost:6443
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove these from here. they get outdated. this should be in -h/--help of the plugin.

Comment on lines +9 to +10
description: |
Start socat with proxy to remote host in Kubernetes and forward one or more local ports to it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Are there no caveats to this tool at all, like maybe the pod requires socat?

In the code I see things like kubectl delete pod, which I would not expect this plugin to do. I think this field is a good opportunity to make it clear to users how it works even more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach is similar to node-shell plugin.

A plugin spawns a new pod with socat to proxy all requests to specified remote hosts, which are available only from Kubernetes cluster.
After usage the pod obviously should be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you explained it really well here. This can be made clear in the description too.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2024
@ahmetb
Copy link
Member

ahmetb commented Feb 6, 2024

Pinging to see if you're interested in updating.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 7, 2024
@ahmetb
Copy link
Member

ahmetb commented Mar 10, 2024

Ping.

@kvaps
Copy link
Member Author

kvaps commented Mar 10, 2024

Let's close it for now, since I have no time to maintain this project anymore

/close

@k8s-ci-robot
Copy link
Contributor

@kvaps: Closed this PR.

In response to this:

Let's close it for now, since I have no time to maintain this project anymore

/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/new-plugin lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants