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

Failed to create the kube client with proxy #251

Open
vitality411 opened this issue Jan 9, 2025 · 4 comments
Open

Failed to create the kube client with proxy #251

vitality411 opened this issue Jan 9, 2025 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@vitality411
Copy link

Hello,
when I use kubectl-view-allocations in an environment with http_proxy and https_proxy variables I get the following error:

k view-allocations -g node
Error:
   0: Failed to create the kube client
   1: configured proxy http://squid:3128/ requires the disabled feature "kube/http-proxy"

Location:
   src/main.rs:47

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

When I unset the variables, it works without issues. Is there some way to circumvent this?

Thanks

@davidB davidB closed this as completed in 7f41606 Jan 9, 2025
@davidB
Copy link
Owner

davidB commented Jan 9, 2025

Thank you for reporting (with the log).
I'm releasing version 0.20.3 with http-proxy enabled.
Please re-open if you still have the issue.

@davidB davidB added bug Something isn't working enhancement New feature or request labels Jan 9, 2025
@vitality411
Copy link
Author

@davidB I don't have permissions to reopen.

I now get the following error:

RUST_BACKTRACE=1 RUST_BACKTRACE=full kubectl view-allocations -g node -u
2025-01-17T05:45:38.104193Z ERROR failed with error client error (Connect)
Error:
   0: Failed to list nodes
   1: ServiceError: client error (Connect)
   2: client error (Connect)
   3: deadline has elapsed

Location:
   src/main.rs:47

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  <empty backtrace>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.

@davidB davidB reopened this Jan 22, 2025
@davidB
Copy link
Owner

davidB commented Jan 22, 2025

It's a permission issue, do you have the permissions to list nodes with the current kube's config.

kubectl get nodes

@vitality411
Copy link
Author

Yes, I have permissions to list nodes. After I do

unset HTTPS_PROXY
unset https_proxy

it works fine but not as long these envs are set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants