Description of problem: When performing `oc login` the options --cluster and --context are ignored. One has to first do `oc config use-context` and then `oc login`. Once logged it, the cluster and context options work for other commands. I think this is inconsistent and inconvenient. As a user I'd expect to be able to perform `oc login` with one of those commands. Then default context should be changed to the one used for login. Or even if default context is not switched, then that would be better than having to switch contexts just to be able to login. Version-Release number of selected component (if applicable): 3.4.1.2 How reproducible: always Steps to Reproduce: 1. setup ~/.kube/config with 2 clusters 2. oc login --context=not-current-context Actual results: login is performed against current context instead of the specified context on command line Expected results: login is performed against the server/context specified on command line
Related PR: https://github.com/openshift/origin/pull/12859
Per Jordan's comment here [1], commands such as `oc project` are meant to be used to address the case of a user wanting to switch to a different context / cluster. It is not the intent of `oc login` to allow the user to manually manage contexts. 1. https://github.com/openshift/origin/pull/12859#issuecomment-278851380
Any reason to not make it easier for the user to actually use different clusters/contexts? As a user of multiple environments I can tell you that it is a great PITA to do so. I need to remember cluster hostname, project and username I'm using on each cluster. With the ability to have shorter mnemonic contexts, it is much more manageable. That's why I filed the original bugzilla - because I find it hardly usable. I don't care whether the tool was originally meant to allow certain usage. I'm proposing to make it more useful for multi-cluster use cases based on my experience using that tool. It is disappointing to see the request closed without a logical reason why it is a bad idea. Moreover there is a related pull request already.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days