-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add kubectl config list-contexts
#25383
Comments
This reminds me that I found it is really a suffer to tell our end user to setup their kubectl configuration. say the user needs to type: $ kubectl config set-cluster --server=xxx
$ kubectl config set-credentials xx --username=xxx password=xxxx
$ kubectl config set-context xxx --cluster=xxx --user=xxx --namespace=xxxx
$ kubectl config use-context xxxx I think that's a lots of commands that user needs to remember and type, if we could provide a much simply command for the new, it would be much help. Like this one: $ kubectl init <name> <server>
username: xxxx
password: xxxx |
We have in the past said that "kubectl login ..." would do that for you, On Tue, May 10, 2016 at 10:44 AM, zhouhaibing089 notifications@github.com
|
When this is added it would be nice if the bash completion could use it to power completion for use-context. e.g.
completes to
|
I'd like to work on this, can someone assign it to me please? I'll have a PR up soon. |
Note: I haven't added the tab completion for use-context, that completions bash script looks like serious magic :-O |
See also #20605 |
Automatic merge from submit-queue Add command "kubectl config get-contexts" ```release-note * A new command "kubectl config get-contexts" has been added. ``` fixes #25383
For the record, here's a way to list contexts in v1.3: |
There's a friendlier command available now which shows all the current contexts, which one you're in, names, clusters, authinfo, and namespaces
|
kubectl config list-contexts
will list the available cluster names to switch.@kubernetes/kubectl
The text was updated successfully, but these errors were encountered: