Unable to login on Openshift clouster using "oc login" command

Latest response

After the upgrading Kubectl, i am unable to login on openshift cluster.

When i am trying to login with "oc login " command it is reverting the below error message:

Error: unknown command "login" for "kubectl"

Did you mean this?

logs

plugin

Run 'kubectl --help' for usage.

Below are the some details of version from machine where i have the login issue________________

kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:58:59Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

error: You must be logged in to the server (the server has asked for the client to provide credentials)

----Below are the some details of version from machine where i have no issue , i am able to login and didn't upgrade kubectl version_____

kubectl version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"$Format:%H$", GitTreeState:"", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.2+f2384e2", GitCommit:"f2384e2", GitTreeState:"clean", BuildDate:"2020-06-16T03:21:27Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Additional: i have checked by downgrade the kubectl versions , but getting same error on that machine where i unable to login using "oc login"

Responses

I'm having the same issue

To both of you, Christian Hess and Muhammed Ameen,

I'm not familiar with this product, but I'm curious if this link may help you or not.

Regards,
RJ

Thanks for your response RJ, Unfortunately I've seen this link already and symlinking is not the issue. It happened to me after installing kubectl and kubectl-vsphere for VMware Tanzu because I wanted to access both from the same machine. There's no symlinking involved. I assume oc uses kubectl under the hood, but I have no idea how.