OpenShift Container Platform command-line interface (CLI) do not save login credentials as expected
Issue
-
It is not possible to log into multiple OCP clusters with the same username using the OCP 4 CLI without having to re-enter credentials every time.
$ oc login -u user https://openshift.cluster.one:443 Authentication required for https://openshift.cluster.one:443 (openshift) Username: user Password: Login successful. $ oc login -u user https://openshift.cluster.one:443 Logged into https://openshift.cluster.one:443" as "user" using existing credentials $ oc login -u user https://openshift.cluster.two:443 Authentication required for https://openshift.cluster.two:443 (openshift) Username: user Password: Login successful. $ oc login -u user https://openshift.cluster.one:443 Authentication required for https://openshift.cluster.one:443 (openshift) Username: user Password: Login successful.
-
It is expected that the last command logs a user in without them having to re-enter their credentials. This used to be the case with earlier versions of the OCP client.
Environment
- Red Hat OpenShift Container Platform (OCP) 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.