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

[Go] kubens not working with in-cluster config #400

Open
SQLExceptionPhil opened this issue Aug 16, 2023 · 1 comment
Open

[Go] kubens not working with in-cluster config #400

SQLExceptionPhil opened this issue Aug 16, 2023 · 1 comment

Comments

@SQLExceptionPhil
Copy link

SQLExceptionPhil commented Aug 16, 2023

When using kubens with a ServiceAccount from within the cluster it isn't working.
From what I saw it comes from how the config is loaded. When using the kubectl tool it uses the in-cluster configuration and given a small and incomplete config file it is also possible to change the namespace:

apiVersion: v1
clusters: null
contexts: 
  - context: 
       namespace: my-namespace
    name: my-context
current-context: "my-context"
kind: Config
preferences: {}
users: null

I think it should be possible to use the old bash version of kubens with this setup - but not the new golang version.

@SQLExceptionPhil SQLExceptionPhil changed the title kubens not working with in-cluster config [Go] kubens not working with in-cluster config Aug 23, 2023
@ahmetb
Copy link
Owner

ahmetb commented Jan 6, 2024

Do you remember what was the error you're seeing? I don't think we'd optimize the tool to try to make it work for in-cluster situation specifically, but if there's an easy fix we can take, we can give a shot.

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

2 participants