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

Vcluster #2680

Open
mysiki opened this issue Apr 27, 2024 · 0 comments
Open

Vcluster #2680

mysiki opened this issue Apr 27, 2024 · 0 comments

Comments

@mysiki
Copy link

mysiki commented Apr 27, 2024




Is your feature request related to a problem? Please describe.
Allow k9s to navigate into Vcluster.

I use vcluster https://www.vcluster.com/docs/ to create virtual cluster and it will be really cool to navigate into vcluster from k9s directly.

I try without success to know how vcluster cli got vcluster list, but I don't know... From the cli, vcluster list return a list of cluster. For each, by default vcluster provide secret with kubeconfig for the virtual cluster (so we can connect with it).

Describe the solution you'd like
Like popey, xray etc integrate vcluster list and connect.

Describe alternatives you've considered
I have create plugin actually, but it's not really cool. Vlcuster list just show info with less -K and connect need to be done on vlcuster kubeconfig secret.

Additional context
I really like to create PR but I check in k9s code and I don't know what / how to do it :D

Finally, vcluster connect from my plugin is just a way to start k9s from kubeconfig present in secret ...

My plugin if it can help :

  vcluster-list:
    shortCut: v
    description: vcluster list
    scopes:
      - all
    command: bash
    background: false
    confirm: false
    args:
      - -c
      - |
        vcluster list --context $CONTEXT | less -K -r
  vcluster-connect:
    shortCut: w
    description: KC connect
    scopes:
      - secret
    command: bash
    background: false
    confirm: false
    args:
      - -c
      - |
        tmp=$(mktemp)
        echo "kubectl get -n $NAMESPACE $NAME $RESOURCE_NAME --template='{{index .data "kubeconfig-vcluster"}}' | base64 -d" > /tmp/test
        kubectl get -n $NAMESPACE $RESOURCE_NAME/$NAME --template='{{index .data "kubeconfig-vcluster"}}' | base64 -d > $tmp
        k9s --kubeconfig $tmp
        rm $tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant