Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Error: unknown flag: --address #19

Open
smoliji opened this issue Mar 25, 2020 · 2 comments
Open

Error: unknown flag: --address #19

smoliji opened this issue Mar 25, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@smoliji
Copy link
Contributor

smoliji commented Mar 25, 2020

Program crashes when when creating the tunnel:

? Choose local port: 3000
Error: unknown flag: --address
Examples:
  # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod
  kubectl port-forward pod/mypod 5000 6000
  # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in a pod selected by the deployment
  kubectl port-forward deployment/mydeployment 5000 6000
  # Listen on port 8888 locally, forwarding to 5000 in the pod
  kubectl port-forward pod/mypod 8888:5000
  # Listen on a random port locally, forwarding to 5000 in the pod
  kubectl port-forward pod/mypod :5000
Options:
      --pod-running-timeout=1m0s: The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running
Usage:
  kubectl port-forward TYPE/NAME [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [options]
Use "kubectl options" for a list of global command-line options (applies to all commands).
unknown flag: --address
2020/03/25 13:36:33 exit status 1
@smoliji smoliji added the bug Something isn't working label Mar 25, 2020
@smoliji
Copy link
Contributor Author

smoliji commented Mar 25, 2020

I have a feeling this landed in #13, and happens for all with kubectl version <= 1.13.0, see kubernetes/kubernetes#40053 (comment)

@sandratatarevicova do you think this is something we want to fix for low kubectl versions?

@sandratatarevicova
Copy link
Contributor

I think we should detect kubectl version and use the --address flag only for version 1.13.0 and higher (see kubernetes/kubernetes#46517 (comment)).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants