oc login command takes long time in RHOCP 4

Solution Verified - Updated -

Issue

  • The oc login takes a long time for cluster login.
  • In the below illustrated output it took approx 4m:
$ time oc login -u ocpadmin
Authentication required for https://api.openshift.lab.example.com:6443 (openshift)
Console URL: https://api.openshift.lab.example.com:6443/console
Username: ocpadmin
Password:
Login successful.

You have access to 91 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".

real    4m13.481s
user    0m0.218s
sys     0m0.075s

Environment

  • Red Hat OpenShift Container Platform (RHOCP) 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content