|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * ingress/configure-ingress-operator.adoc |
| 4 | +// |
| 5 | + |
| 6 | +[id="nw-ingress-configuring-application-domain_{context}"] |
| 7 | += Configuring application domain for the Ingress Controller Operator on AWS |
| 8 | + |
| 9 | +//OpenShift Dedicated or Amazon RH OpenShift cluster administrator |
| 10 | + |
| 11 | +As a cluster administrator, you can specify an alternative default domain for user-created routes by configuring `appsDomain` field. If you specify an alternative domain, it overrides the default cluster domain for the purpose of determining the default host for a new route. |
| 12 | + |
| 13 | +For example, you can use the DNS domain for your company as the default domain for routes and ingresses for applications running on your cluster. |
| 14 | + |
| 15 | +.Prerequisites |
| 16 | + |
| 17 | +//* You deployed an {OSD} cluster. |
| 18 | +* You deployed an {product-title} cluster on AWS infrastructure. |
| 19 | +* You installed the `oc` command line interface. |
| 20 | + |
| 21 | +.Procedure |
| 22 | + |
| 23 | +. Configure the `appsDomain` field by specifying an alternative default domain for user-created routes. |
| 24 | ++ |
| 25 | +.. Edit the Ingress Controller Operator: |
| 26 | ++ |
| 27 | +[source,terminal] |
| 28 | +---- |
| 29 | +$ oc edit ingresses.config/cluster -o yaml |
| 30 | +---- |
| 31 | ++ |
| 32 | +.. Edit the YAML file: |
| 33 | ++ |
| 34 | +.Sample `appsDomain` configuration to `apps.acme.io` |
| 35 | +[source,yaml] |
| 36 | +---- |
| 37 | +apiVersion: config.openshift.io/v1 |
| 38 | +kind: Ingress |
| 39 | +metadata: |
| 40 | + name: cluster |
| 41 | +spec: |
| 42 | + domain: apps.<domain_url> |
| 43 | + appsDomain: apps.acme.io |
| 44 | +---- |
| 45 | ++ |
| 46 | +. Verify that an existing route contains the new domain name by exposing the route and verifying the route domain change: |
| 47 | +//+ |
| 48 | +//.. Access the Ingress Controller Operator YAML file: |
| 49 | +//+ |
| 50 | +//[source,terminal] |
| 51 | +//---- |
| 52 | +//$ oc get ingresses.config/cluster -o yaml |
| 53 | +//---- |
| 54 | ++ |
| 55 | +[NOTE] |
| 56 | +==== |
| 57 | +Wait for the `openshift-apiserver` finish rolling updates before exposing the route. |
| 58 | +==== |
| 59 | ++ |
| 60 | +.. Expose the route: |
| 61 | ++ |
| 62 | +[source,terminal] |
| 63 | +---- |
| 64 | +$ oc expose service hello-openshift |
| 65 | +route.route.openshift.io/hello-openshift exposed |
| 66 | +---- |
| 67 | ++ |
| 68 | +.. Verify route domain change: |
| 69 | ++ |
| 70 | +[source,terminal] |
| 71 | +---- |
| 72 | +$ oc get routes |
| 73 | +NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD |
| 74 | +hello-openshift hello-openshift-my-project.apps.acme.io hello-openshift 8080-tcp None |
| 75 | +---- |
0 commit comments