Skip to content

Support proxy-url from ~/.kube/config #2468

Open

Description

@flybyray

Environment
VS Code version: 1.68.1
OS: win32
Extension version: 0.4.0
Description

I have setup proxy-url in ~/.kube/config.

apiVersion: v1
clusters:
- cluster:
    proxy-url: socks5://localhost:1080

Usage description: https://kubernetes.io/docs/tasks/extend-kubernetes/socks5-proxy-access-api/#client-configuration

This works as it should with oc from command line.

~ $ oc version
Client Version: 4.10.0-0.okd-2022-06-10-131327
Server Version: 4.8.17
Kubernetes Version: v1.21.1+6438632

But the extension is not using this property.

Activity

  1. dgolovin commented on Jun 30, 2022

    @dgolovin
    Collaborator

    @flybyray thank you for reporting this. I tested kubectl, oc and odo in exactly the same environment.

    oc and odo does not support proxy-url in ~/.kube/config as you mentioned above, but they do support https_proxy env variable.
    kubectl supports both ways.

    Workaround: set https_proxy env manually and then restart vscode.

    Fix: set https_proxy env var when running oc or odo if current context has proxy-url property set.

  2. flybyray commented on Jul 1, 2022

    @flybyray
    Author

    @dgolovin thx i know such workarround but it is not applicable for all use cases, because in this case even vscode + extensions use it and hence things do not work as expected anymore.
    with proxy-url the proxy will only be used selective for this specific tool.

  3. added this to the 0.6.0 milestone on Jul 3, 2022
  4. dgolovin commented on Jul 3, 2022

    @dgolovin
    Collaborator

    @flybyray thank you for pointing that out. I'm setting higher priority for this issue.

  5. mohitsuman commented on Aug 7, 2022

    @mohitsuman
    Contributor

    Fixed by #2502

  6. dgolovin commented on Aug 9, 2022

    @dgolovin
    Collaborator

    @mohitsuman no it it was related to the issue, but not an actual fix.

  7. dgolovin commented on Aug 9, 2022

    @dgolovin
    Collaborator

    @flybyray @mohitsuman It cannot be fixed for several reasons. I did my best to workaround what I could, but it didn't work.
    Here are the problems:

    1. Official @kubernetes/nodejs-client does not aware of proxy-url property for a cluster and when I use it to load configuration the proxy-url property is just ignored and not loaded.
    2. I was developing workaround for it which would just search for this property through the config files, but 'oc' and 'odo' removes it during login command call.

    Basically nether official javascript client nor openshift oc/odo cli are supporting this use case.

  8. flybyray commented on Aug 10, 2022

    @flybyray
    Author

    oc supports it see the description. I tested it.

    Hence i understand that this extension will not support it if it is not base on oc.

  9. dgolovin commented on Aug 10, 2022

    @dgolovin
    Collaborator

    @flybyray let me check latest oc version to confirm.

  10. 25 remaining items

  11. added this to the 1.14.0 milestone on Apr 2, 2024
  12. modified the milestones: 1.15.0, 1.16.0 on May 30, 2024
  13. modified the milestones: 1.16.0, 1.17.0 on Jun 27, 2024
  14. modified the milestones: 1.17.0, 1.19.0 on Sep 18, 2024
  15. modified the milestones: 1.19.0, 1.20.0 on Apr 29, 2025
  16. modified the milestones: 1.20.0, 1.21.0 on Jul 17, 2025
  17. modified the milestones: 1.21.0, 1.22.0 on Sep 22, 2025
  18. modified the milestones: 1.21.1, 1.22.0 on Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions