Creating a custom route to the platform

After you install IBM® Cloud Pak for Data, you can optionally create an alternative route by which users access the Cloud Pak for Data web client.

Permissions you need to complete this task
You must be either:
  • A cluster administrator
  • An administrator of the Red Hat® OpenShift® project (namespace) where Cloud Pak for Data is installed.
When you need to complete this task
This task is optional. However, if you plan to create a custom route to the platform, it is recommended that you complete this task before you give users access to the platform. This ensures that users have the link that you want them to use to access the platform.

Before you begin

About this task

In Red Hat OpenShift, a route is how you expose a service. A route is an externally reachable hostname, such as https://www.ibm.com.

By default, the route to the Cloud Pak for Data web client has the following format:
https://cpd-namespace.apps.OCP-default-domain

You can create a custom route that users can use to access the Cloud Pak for Data platform.

Procedure

  1. Log in to Red Hat OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  2. Change to the project where Cloud Pak for Data is installed:
    oc project project_name
  3. Run the following command to create the new route:
    oc create route passthrough route_name --hostname hostname --service=ibm-nginx-svc
    • Replace route_name with the label you want to use for the route.
    • Replace hostname with the FQDN you want to assign to the route.
    The following example command creates a route called mycompany with a FQDN of mycompany.com:
    oc create route passthrough mycompany --hostname mycompany.com --service=ibm-nginx-svc 
  4. Run the following command to annotate the route:
    oc annotate route route_name haproxy.router.openshift.io/balance=roundrobin

    Replace route_name with the value that you specified in the preceding step.

    Users can now access the Cloud Pak for Data through the route that you created.
  5. Run the following command to ensure that any HTTP requests are automatically redirected to HTTPS:
    oc patch route route_name -p "{\"spec\":{\"tls\":{\"insecureEdgeTerminationPolicy\":\"Redirect\"}}}"