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

Port forwarding with named ports #202

Closed
mcristina422 opened this issue May 31, 2019 · 2 comments
Closed

Port forwarding with named ports #202

mcristina422 opened this issue May 31, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@mcristina422
Copy link
Contributor

mcristina422 commented May 31, 2019




Describe the bug
When selecting a container to port forward the prefilled text is incorrect if the container uses a named port.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a pod with a container using a named port
  2. Do a PortForward with <shift-f>
  3. Notice the prefilled text is <port name>:<port#>
  4. Attempt to select defaults
  5. Error PortForward failed! Invalid port format 'web:9090:web:9090'

image

ports:
        - containerPort: 9090
          name: web

Expected behavior
The port number, or named port, or combination of the two would be accepted as a valid input

Workaround
Manually removing the web:

Versions:

  • K9s 0.7.1
@derailed derailed added the bug Something isn't working label May 31, 2019
@derailed
Copy link
Owner

@mcristina422 Great catch! Thanks for reporting back!
I'll fix it on the next drop, for the short term, you should be able to edit the forward to just use the port#.

@derailed
Copy link
Owner

derailed commented Jun 3, 2019

@mcristina422 Fixed 0.7.2!

@derailed derailed closed this as completed Jun 3, 2019
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants