Creating routes

If you want to host Usage Metering Service at a public URL and the route was not created automatically during the installation, create the route manually.

Procedure

  1. Log in to your OpenShift cluster console.
  2. Go to Networking > Routes.
  3. From the Project drop-down list, choose ibm-usage-metering.
  4. To create the ibm-usage-metering-fetch route, click Create Route, and choose YAML view.
  5. Update the spec section as follows.
    s
    spec: 
      # Example: ibm-usage-metering-fetch-ibm-usage-metering.apps.cluster.domain.com
      host: ${ROUTE_HOSTNAME}
      
      # Target service
      to: 
        kind: Service
        name: ibm-usage-metering-instance
        weight: 100
      
      # Port configuration - using named port 'ibm-usage-metering-fetch'
      port: 
        targetPort: ibm-usage-metering-fetch
     
    Where ${ROUTE_HOSTNAME} is an alias or DNS that points to the service.
  6. Click Create.