GithubHelp home page GithubHelp logo

Comments (8)

LarsBingBong avatar LarsBingBong commented on May 30, 2024 1

Hi @danielfoehrKn,

Thank you very much - I'm of the idea that the more details I provide the easier the fix.

What the dang! I did some more troubleshooting based on the info you provided in your latest answer. And I have to admit that I've been the greatest of n00b's on this one. I was installing kubeswitch by way of download the binary and moving it to the /usr/local/bin folder. However, as I'm no longer - wisely so - not running as sudo on my Linux box - I had to run that install script for installing kubeswitch as sudo - but that then resulted in kubeswitch getting installed at an incorrect user scope.
So I read the docs again and I'm now using the brew installation method.

Everything seems to work now.

I'm sorry for having basically almost wasted your time (I say almost because this fix is great).

Bare with me and have a great day - I think this one can be closed as solved.

from kubeswitch.

danielfoehrKn avatar danielfoehrKn commented on May 30, 2024

Hi, thanks for reporting!

Can you check if that fix works for you?

You would need to use the from source installation to test it.
If it works for you I ll incorporate it in the next patch version.

from kubeswitch.

larssb avatar larssb commented on May 30, 2024

from kubeswitch.

danielfoehrKn avatar danielfoehrKn commented on May 30, 2024

@larssb does the issue still exist or can this issue be closed?

from kubeswitch.

LarsBingBong avatar LarsBingBong commented on May 30, 2024

I'm very sorry @danielfoehrKn,

I've wanted to test this for a long long time (larssb here - just on GitHub via a comp. user). So, I still experience this issue and I don't know why.

The err.

when I execute switch or /home/linuxbrew/.linuxbrew/opt/switcher/bin/switcher >> Error: the configured kubeconfig directory "" does not exist is thrown.

Again I find that I can get rid of the err. if I put a kubeconfig file named config into the ~/.kube dir.
However, even though I've specified - "~/.kube/clusters/" as the value to the paths: parameter, a file named e.g. test inside the - "~/.kube/clusters/" dir. is not found by Kubeswitch. What am I misunderstanding?

Debug

.kube folder contents

ls -la gives:

ls -la ~/.kube/
total 20
drwxr-xr-x  4 linuxlars linuxlars 4096 Aug 30 12:35 .
drwxr-xr-x 14 linuxlars linuxlars 4096 Aug 30 12:35 ..
drwxr-xr-x  2 linuxlars linuxlars 4096 Aug 30 12:33 clusters
-rw-r--r--  1 linuxlars linuxlars  151 Aug 30 12:32 switch-config.yaml
drwxr-xr-x  2 linuxlars linuxlars 4096 Aug 30 11:47 switch-state

switch-config.yaml contents

kind: SwitchConfig
version: v1alpha1
kubeconfigName: "*"
hooks: []
kubeconfigStores:
- id: default
  kind: filesystem
  paths:
  - "~/.kube/clusters/"

Regarding the patch

I'm not 100 percent. But, to me it looks like the patch you mention has been merged into master and thereby, as I run v0.4.6 of Kubeswith I should be good in this regard.
The err. message is also a tad different from the one I got back in March 21.

Am I right or do I still need to try out the patch by using the source installation method.


Thank you very much - and I'm looking forward to hear from you.

from kubeswitch.

LarsBingBong avatar LarsBingBong commented on May 30, 2024

@danielfoehrKn what is your take on this is I may.

Thank you πŸ₯‡

from kubeswitch.

danielfoehrKn avatar danielfoehrKn commented on May 30, 2024

Hi @LarsBingBong thank again for reporting such a detailed issue.

when I execute switch or /home/linuxbrew/.linuxbrew/opt/switcher/bin/switcher >> Error: the configured kubeconfig directory "" does not exist is thrown.

I could reproduce that and pushed a fix that you could try out by installing it from source (just follow the instructions on the readme. Not more than git clone & make build-switcher and then move the binary to your path). EDIT: I published release 0.4.7 that contains the fix.

However, even though I've specified - "/.kube/clusters/" as the value to the paths: parameter, a file named e.g. test inside the - "/.kube/clusters/" dir. is not found by Kubeswitch. What am I misunderstanding?

I used your configuration file and created the ~/.kube/clusters/" directory with a valid kubeconfig with name test.
Using the kubeswitch version 0.4.6 like you.
The kubeconfig was always found - I somehow cannot reproduce the issue :(

Is there an error or are the kubeconfig contexts just not found?

Things to look for

  • does the user executing the switch script + binary have access (correct filesystem permissions) to both the configuration file as well as the ~/.kube/clusters/ directory? Same thing for the kubeconfig file?
  • can you provide a sanitized version of your kubeconfig file?

from kubeswitch.

larssb avatar larssb commented on May 30, 2024

Pointing to the latest comment from my comp. GitHub acc. I'll hereby close the issue.

from kubeswitch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.