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

proxy-url in kube config not used #853

Open
jalkjaer opened this issue Aug 1, 2022 · 14 comments
Open

proxy-url in kube config not used #853

jalkjaer opened this issue Aug 1, 2022 · 14 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Comments

@jalkjaer
Copy link

jalkjaer commented Aug 1, 2022

Cluster config in kube config allows proxy-url setting (i.e. proxy-url: http://127.0.1.1:8080) but is not used in the js lib

** Client Version **
e.g. 0.13.6

** Server Version **
doesn't apply

To Reproduce
Running the example from the main README.md with the current context pointing to a cluster that is configured with proxy-url, the example with throw "connect EHOSTUNREACH" when the cluster IP is not directly accessible.

Running the example with the env var HTTP_PROXY works as expected

Expected behavior
The clientlib should respect the proxy-url setting

** Example Code**

const k8s = require('@kubernetes/client-node');

const kc = new k8s.KubeConfig();
kc.loadFromDefault();

const k8sApi = kc.makeApiClient(k8s.CoreV1Api);
k8sApi.listNamespacedPod('default').then((res) => {
    console.log(res.body);
}).catch(console.error);

Environment (please complete the following information):

  • OS: Linux
  • NodeJS Version 12.10.0
@brendandburns
Copy link
Contributor

Relevant pointers:

This really points out the need for a clean spec for the kubeconfig file, since this never went through a KEP or anything else and just merged.

I'm happy to take a PR to add support for this, otherwise, we will get to it eventually.

@brendandburns brendandburns added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Aug 8, 2022
@dgolovin
Copy link

Full implementation, obviously, is going to take time. Is that possible to start applying some fixes related to this issue? For example, stop filtering 'proxy-url' property while loading cluster configuration from config here.

@mstruebing
Copy link
Member

mstruebing commented Aug 17, 2022

I would like to try to provide a PR for this.

Could someone recommend a way to set up a test environment for this?
Would it be correct to assume that if I have a Kubernetes cluster and do a kubectl proxy --port <number> and set the proxy URL to http://127.0.01:<number> in my kubeconfig that this is a valid way to test this?
Or do I need to set up a nginx reverse proxy for this?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 7, 2023
@bradyburke
Copy link

Any update on this? I am running into the same issue

@bradyburke
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 22, 2023
@bradyburke
Copy link

Any update on this issue?

@himanshusharma27
Copy link

please assign me this issue.

@SD007CSE
Copy link

/assign

@SD007CSE
Copy link

I am having an issue for kube test and kube run docs
Screenshot 2023-05-10 at 3 31 58 AM

@SD007CSE
Copy link

@brendandburns Help me out

@j4acks0n
Copy link

I am having an issue for kube test and kube run docs Screenshot 2023-05-10 at 3 31 58 AM

Hello Mybe You Can Try
import { BsModalModule } from 'ng2-bs3-modal';
Mybe This Will Help

@j4acks0n
Copy link

Any update on this issue?
Hello,
Mybe You Can Try This Multiple Solution
Way 1.Export KubeConfig To Path Directory Yaml Or
Way 2.Paste The Yaml to YourDirectory/.Kube/Config

@SD007CSE
Copy link

Actually in most of the .ts files which have "/api" it showing the the problem Module `'"./api"' has no exported member 'V1Secret'.ts(2305)``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

10 participants