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

Umbrella issue for kubectl config command overhaul #20605

Open
bgrant0607 opened this issue Feb 3, 2016 · 14 comments
Open

Umbrella issue for kubectl config command overhaul #20605

bgrant0607 opened this issue Feb 3, 2016 · 14 comments
Labels
area/kubectl lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@bgrant0607
Copy link
Member

kubectl config strongly departs from the command and output conventions of other commands. It shouldn't.

Current commands:
https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/kubectl/kubectl_config.md

Conventions:
https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md

Related: #5592, #7804, #8593, #8817, #9298, #10516, #10626, #10693, #10735, #11233, #16085, #16935, #20374

@deads2k proposed English descriptions:
#8593 (comment)
#20468 (comment)

@thockin proposed a family of commands:
#8593 (comment)
#10516 (comment)

TODO: Create proposal

cc @jlowdermilk @deads2k @thockin @quinton-hoole @kubernetes/kubectl

@bgrant0607
Copy link
Member Author

Also, version, componentstatus, cluster-info, current-context, api-versions.

@bgrant0607
Copy link
Member Author

bgrant0607 commented Mar 12, 2016

Video from skippbox:
https://www.youtube.com/watch?v=iMfUfrEYfRQ

@smparkes
Copy link

FWIW, the relationship with glcoud is also a bit confusing when switching contexts.

My "best guess" gcloud config set container/cluster CLUSTER_NAME doesn't change the kubeconfig, i.e., "best guess" is not "good guess".

But gcloud container clusters get-credentials CLUSTER_NAME does, which was unexpected.

Took me a while (and grubbing through the sdk) to realize that it was get-credentials making the change, not the set.

get-credentials is kind of overkill but better than using kubectl directly since the kubeconfig context.name != CLUSTER_NAME.

@bgrant0607
Copy link
Member Author

cc @quinton-hoole

@bgrant0607
Copy link
Member Author

Ref #23492

@bgrant0607
Copy link
Member Author

It's also unfortunate that it takes 3 commands to set up kubectl for a new cluster. For example:

kubectl config set-cluster minikube --insecure-skip-tls-verify=true --server=http://192.168.99.100:8080
kubectl config set-context minikube --cluster=minikube
kubectl config use-context minikube

@bgrant0607
Copy link
Member Author

There's some discussion in #25383, also

@janetkuo
Copy link
Member

#25601 for deleting cluster from kubectl config

@duglin
Copy link

duglin commented Aug 16, 2016

I'd like to suggest that we look at : http://kubernetes.io/docs/user-guide/docker-cli-to-kubectl/
and consider what it would take to make the kubectl version of these commands as easy and friendly to use as they are with Docker. That could really help define a pattern for how we revamp things.

Each extra parameter, each extra step needed, each extra bit of extra output (noise) should be scrutinized and questioned.

Yes, I'm holding up Docker as our minimum bar because I think they've done a great job so far. If kubectl can surpass them then that's great, but let's at least give our users an on-par experience.

@duglin
Copy link

duglin commented Aug 16, 2016

oh oops, this is about just kubectl config, not just kubectl in general... I'll try to find a better home for the comment. :-)

@deads2k
Copy link
Contributor

deads2k commented Aug 16, 2016

oh oops, this is about just kubectl config, not just kubectl in general... I'll try to find a better home for the comment. :-)

@duglin tag me in where you end up dropping this? I'd like some more detail on which commands you want to emulate. Some commands like docker ps I could see, but others like docker run (75-ish flags and counting) are less obvious to hold up as a examples.

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@bgrant0607 bgrant0607 added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Jun 8, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 26, 2017
@bgrant0607
Copy link
Member Author

/remove-lifecycle stale
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 22, 2018
@rcoup
Copy link

rcoup commented May 10, 2019

Adding a native way to get the current namespace that's simpler than kubectl config view -o jsonpath="{.contexts[?(.name==\"$(kubectl config current-context)\")].context.namespace}" would be a win too 😄

As another source of ideas, kubectx & kubens have been great tools for our team — managing a small set of contexts rather than hundreds of cluster/namespace combinations. Maybe they could even be folded into kubectl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
Status: Needs Triage
Development

No branches or pull requests

9 participants