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

Allow specifying context and namespace as ENV vars or CLI params #12

Open
jonmoter opened this issue Sep 8, 2017 · 1 comment
Open

Comments

@jonmoter
Copy link

jonmoter commented Sep 8, 2017

I have an admin host that has a kubeconfig.yml file with many clusters and contexts configured. The YAML file is shared between many users, so it's read only.

It would be great if I could set an ENV var or pass a command line prompt which would set the default context or namespace of all the commands I run in kube prompt.

Something like:

kube-prompt --context=test-cluster --namespace=default

or

export CONTEXT=test-cluster NAMESPACE=default
kube-prompt

When I use kubectl in my day-to-day, I usually create aliases like:

alias kc="kubectl --context=test-cluster --namespace=default"
kc get pods

So this feature request would allow me to do the equivalent with kube-prompt.

Btw, great utility! Thanks for creating it!

@c-bata
Copy link
Owner

c-bata commented Sep 14, 2017

kube-shell has great solution to fix this problem because toolbar(displays the bottom of terminal) feature provided by python-prompt-toolkit.
(this issue is related with #5 and #6 )

Your suggested option is more easy solution than kube-shell.
So if it's difficult to implement toolbar feature in go-prompt, I may choice your suggested solution.
Thanks.

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