Error while installing Openjdk1.8 using microdnf on UBI8/RHEL8 [closed]

I’m getting error while adding OpenJDK1.8.0 using microdnf on top of RHEL8/UBI8 image. It is failing with the error :

Downloading metadata...
error: cannot update repo 'ubi-8-baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (28): Timeout was reached for 

I tried searching for the fix but couldn’t get much information. Any help is really appreciated.

Source: StackOverflow