Configure router ports

To bind the ingress router to specific HTTP and HTTPS port numbers in MicroShift, you can edit the ingress.ports.http and ingress.ports.https settings in config.yaml file.

Prerequisites
  • You installed MicroShift.

  • You created a MicroShift config.yaml file.

  • The OpenShift CLI (oc) is installed.

Tip

If you complete all the configurations that you need to make in the MicroShift config.yaml file at the same time, you can minimize system restarts.

Procedure
  1. Update the MicroShift config.yaml port values in the ingress.ports.http and ingress.ports.https fields to the ports you want to use:

    Example config.yaml router settings
    # ...
    ingress:
      ports:
        http: 80
        https: 443
      routeAdmissionPolicy:
        namespaceOwnership: InterNamespaceAllowed
      status: Managed
    # ...

    where:

    ingress.ports

    Specifies the HTTP and HTTPS port numbers to bind the ingress router to. This field is customizable. Valid values for both port entries are a single, unique port in the 1-65535 range. The values of the ports.http and ports.https fields cannot be the same.

    status

    Specifies the status of the ingress ports. The default value is Managed. Managed is required for the ingress ports to remain open.

  2. Restart the MicroShift service by running the following command:

    $ sudo systemctl restart microshift