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

kdash doesn't respect HTTPS_PROXY environment variable #380

Open
b3ndill opened this issue Sep 6, 2023 · 8 comments
Open

kdash doesn't respect HTTPS_PROXY environment variable #380

b3ndill opened this issue Sep 6, 2023 · 8 comments

Comments

@b3ndill
Copy link

b3ndill commented Sep 6, 2023

Describe the bug
I have a cluster on a private network that I need to access via a bastion host. Under normal circumstances I can use kubectl by including a proxy-url parameter in the Kubernetes context and setting the HTTPS_PROXY environment variable.
With kdash I get a timeout error: Failed to get namespaces. HyperError(hyper::Error(Connect, Custom { kind: TimedOut, error: Elapsed(()) }))

To Reproduce

  1. Set a proxy-url parameter for your private Kubernetes cluster
  2. Set up a port-forward connection via a jump host using SSH
  3. Export the forwarded port to HTTPS_PROXY variable.
  4. Launch kdash

Expected behavior
kdash should utilize the HTTPS_PROXY environment variable, if it is set, when trying to connect to the Kubernetes cluster.

Desktop:

  • OS and OS version: macOS 13.5
  • Terminal name and version: iTerm2 3.4.20
  • Shell name and version zsh
  • Kubectl Client Version: v1.26.7
  • Kubectl Server Version: v1.26.5
  • KDash version 0.4.2
@deepu105
Copy link
Contributor

deepu105 commented Sep 7, 2023

might be related to kube-rs/kube#1013 need to dig in further

@b3ndill
Copy link
Author

b3ndill commented Nov 2, 2023

Just a heads-up, it seems like SOCKS5 support has been merged in kube-rs/kube#1311. It should be available (behind a feature flag) in release 0.87.1.

@deepu105
Copy link
Contributor

deepu105 commented Nov 2, 2023 via email

@deepu105
Copy link
Contributor

I have enabled sock5 feature in version 0.6

@deepu105
Copy link
Contributor

can you test and confirm plz

@b3ndill
Copy link
Author

b3ndill commented Jan 27, 2024

can you test and confirm plz

I've updated kdash but I'm not getting any cluster information. It sees the correct context but isn't capable of connecting to the cluster. However, kubectl works fine from the same terminal session.

Let me know how I can test this further! 😉

@deepu105
Copy link
Contributor

Can you pass me your kube/config after removing private/sensitive info (I'm mainly interested in how the cluster authentication is structured)

Also what do you see if you run kdash --debug

@b3ndill
Copy link
Author

b3ndill commented Feb 2, 2024

Sorry for the late reply, here is the kube config:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <redacted>
    proxy-url: http://localhost:8888
    server: https://172.16.0.2
  name: gke_account_region_cluster
contexts:
- context:
    cluster: gke_account_region_cluster
    user: gke_account_region_cluster
  name: gke_account_region_cluster
current-context: gke_account_region_cluster
kind: Config
preferences: {}
users:
- name: gke_account_region_cluster
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args: null
      command: gke-gcloud-auth-plugin
      env: null
      installHint: Install gke-gcloud-auth-plugin for use with kubectl by following
        https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
      interactiveMode: IfAvailable
      provideClusterInfo: true

Running kdash --debug doesn't produce any meaningful results. I'm still getting the following error Failed to get namespaces. HyperError(hyper::Error(Connect, Custom { kind: TimedOut, error: Elapsed(()) })).

@b3ndill b3ndill closed this as completed Feb 2, 2024
@b3ndill b3ndill reopened this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants