How to access container platform on Azure using Code Ready Container

Posted on

I have setup Openshift Container Platform 4.2 using CodeReady Containers on Azure. I have used CentOS VM on Azure.

I can login to CentOS (HOSTOS) using PUTTY and access the platform using 'OC' tool.

However, the web console url is https://console-openshift-console.apps-crc.testing and this is accessible only from within the CentOS (HOST OS). Since I am using Azure CentOS VM, I have access to this VM using putty only.

I tired using nginx to use as proxy server and connect to 'console-testing' url.
NGINX Configuration:

server {
    listen 80;
    listen [::]:80;
    listen 443;
    listen [::]:443;
    server_name XYZ.cloudapp.azure.com;

    location /console {
          proxy_pass https://console-openshift-console.apps-crc.testing;
          sub_filter console-openshift-console.apps-crc.testing XYZ.cloudapp.azure.com;
          sub_filter_once off;
  }
}

But it fails as the application redirects to another url for auth/login.

Any help would be highly appreciated.