Giter Club home page Giter Club logo

Comments (9)

t0meck avatar t0meck commented on June 27, 2024 1

If contents for this window is provided from kube/config then rewriting it to show list with names and urls to cluster along with +/- buttons which would then literally add or remove configs to/from kube/config would be enough I suppose.

I wish my skill in node was higher so I could help here...

from kubebox.

astefanutti avatar astefanutti commented on June 27, 2024

Hi thanks for the feedback.

We've have somehow divided the context management in two separate dialog:

  • Pressing the l key to browse and change contexts
  • Pressing the n key to switch between namespace

Let us know if the dialog open with the l key meets your need. Otherwise, it may be useful to have a dialog closer the what kubectl config get-contexts outputs.

from kubebox.

t0meck avatar t0meck commented on June 27, 2024

Nope. When I press "l" (lowercase L) i get a dialog which shows login instead of list of contexts.
I use AKS (Azure Kubernetes Services) and config is put there by "az aks get-credentials -n AKS_NAME -g AKS_RESOURCE_GROUP" so I don't operate usually on tokens etc...

I mean:
kubectl config get-contexts -o name
Can output of above command be put in a box like switching between namespaces is organized?
Or if not possible to call different command then above command just read ~/.kube/config which is written in yaml format and just extract:

  • contexts.context.name and if possible also contexts.context.namespace
  • current-context

from kubebox.

astefanutti avatar astefanutti commented on June 27, 2024

Actually, from the login dialog (open by pressing the l key), you can browse and switch context using the left and right arrow keys. I plan to make that more obvious from the UI, and provide more fields for the contexts in addition to username / password / token.

I'm not familiar with AKS, but if it uses the az aks get-credentials command as exec field from the user Kube config to retrieve the token, this is something that has yet to be supported by Kubebox as in #32.

from kubebox.

t0meck avatar t0meck commented on June 27, 2024

No. az aks get-credentials will connect to azure and download from it credentials which are needed to connect to cluster. It will also append them to kube/config automatically.
So what is only required is just to read the kube/config file and use credentials stored there.

from kubebox.

astefanutti avatar astefanutti commented on June 27, 2024

Then, you should be able to find the corresponding context in the login widget with the left and right arrow keys.

from kubebox.

t0meck avatar t0meck commented on June 27, 2024

Ok. They're there. Thx.
But even then if possible, selecting connection from list like namespaces are shown is much more convenient.

from kubebox.

astefanutti avatar astefanutti commented on June 27, 2024

Yes, I agree it's not very convenient, especially as the number of contexts increases. We need to improve the UI for browsing / switching contexts. Thanks for the feedback.

from kubebox.

astefanutti avatar astefanutti commented on June 27, 2024

Yes, the content of the login widget is sourced from the kubeconfig file. It's just a matter of improving the UI.

from kubebox.

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.