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

support/warn if KUBECONFIG has multiple paths #8946

Closed
maxandersen opened this issue Apr 29, 2020 · 12 comments
Closed

support/warn if KUBECONFIG has multiple paths #8946

maxandersen opened this issue Apr 29, 2020 · 12 comments
Labels
area/kubernetes kind/enhancement New feature or request triage/out-of-date This issue/PR is no longer valid or relevant triage/upstream Used for issues which are caused by issues in upstream projects/dependency

Comments

@maxandersen
Copy link
Contributor

Describe the bug
when having KUBECONFIG like:

echo $KUBECONFIG
/Users/max/.kube/config:/Users/max/.kube/kubeconfig:/Users/max/Downloads/openshift-install-mac-4.2.2/myinstall/auth/kubeconfig

kubernetes client related operations fails siliently and you get "Unknown host kubernetes.default.svc: nodename nor servname provided, or not known"

Expected behavior
read the working KUBECONFIG or at least warn.

Actual behavior

@geoand geoand added the kind/enhancement New feature or request label Apr 29, 2020
@geoand
Copy link
Contributor

geoand commented Apr 29, 2020

@iocanel are there any utilities in the Kubernetes Client that deal with this or should we just roll something up in Quarkus?

@iocanel
Copy link
Contributor

iocanel commented Apr 29, 2020

No, this is a limitation of the client and needs to be fixed there I am afraid.

@geoand
Copy link
Contributor

geoand commented Apr 29, 2020

Are you going to take care of it, or should we engadge the DevTools folks?

@iocanel
Copy link
Contributor

iocanel commented Apr 29, 2020

Let's ask Rohan or Marc if the can take care of it.

@geoand
Copy link
Contributor

geoand commented Apr 29, 2020

@rohanKanojia can you take a look please?

@rohanKanojia
Copy link

We will take care of it. Thanks for letting us know

@geoand
Copy link
Contributor

geoand commented Apr 29, 2020

Great, thanks

@manusa
Copy link
Contributor

manusa commented Apr 29, 2020

What would the preferred behavior be?

As of now I see a couple of corner cases to "read the working KUBECONFIG":

  • More than one configuration works
  • None works

Maybe pick the first one and show a WARNING like "Detected several configurations in KUBECONFIG environment variable, using ${firstConfiguration}"

@geoand
Copy link
Contributor

geoand commented Apr 29, 2020

Maybe pick the first one and show a WARNING like "Detected several configurations in KUBECONFIG environment variable, using ${firstConfiguration}"

I think that is a reasonable way to move forward. Also perhaps a message on how users can get rid of the multiple configurations would be nice.

@manusa
Copy link
Contributor

manusa commented May 4, 2020

We just released https://github.com/fabric8io/kubernetes-client/releases/tag/v4.10.0

Warning should be visible in this new version.

@geoand
Copy link
Contributor

geoand commented May 4, 2020

Excellent!

@geoand
Copy link
Contributor

geoand commented Aug 2, 2021

Closing as the client already addressed this issue

@geoand geoand added triage/upstream Used for issues which are caused by issues in upstream projects/dependency triage/out-of-date This issue/PR is no longer valid or relevant labels Aug 2, 2021
@geoand geoand closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/enhancement New feature or request triage/out-of-date This issue/PR is no longer valid or relevant triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
None yet
Development

No branches or pull requests

5 participants