How to configure additional ingress router with labels

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Service on AWS (ROSA)
    • 4

Issue

  • Is it possible to configure additional ingress router with labels in ROSA ?
  • How to modify applicationIngress object to use PublishingStrategy in a ROSA ingress operator. (by adding labels)

Resolution

In ROSA, it is possible to create an additional ingress router and modify it using custom labels.

Prerequisites :

  1. The ROSA cluster should not be a PrivateLink cluster.
  2. The ROSA cluster should be a non-STS cluster.

Steps/Procedure :

  1. Login to your cluster using ROSA cli.

  2. List down all the available ingresses in your cluster (grab the id of router which needs to be modified from this step; for example a1b2) :

$ rosa list ingresses -c <cluster-name>
  1. Create a new ingress router interactively as shown below : (or follow step 4 if the cluster is already having an additional ingress router) :
$ rosa create ingress -c <cluster-name> -i
? Label match for ingress (optional): <key=value>
? Private ingress (optional): <Yes/No>
I: Ingress has been created on cluster '<cluster-name>'.
I: To view all ingresses, run 'rosa list ingresses -c <cluster-name>'
  1. Add label foo=bar into the ingress router.
    (This will overwrite if you have any previous key=value pair as label)
$ rosa edit ingress a1b2 --label-match=foo=bar -c <cluster-name>
  1. Add multiple labels as key=value pair in router :
$ rosa edit ingress a1b2 --label-match=foo=bar,foo2=bar2 -c <cluster-name>

Now the custom labels has been added to the additional ingress router. This can viewed in the OCM console under networking tab of the respective ROSA cluster.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments