|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/ingress-operator.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="nw-create-custom-ingress-controller_{context}"] |
| 7 | += Creating a custom Ingress Controller |
| 8 | + |
| 9 | +As a cluster administrator, you can create a new custom Ingress Controller. Because the default Ingress Controller might change during {product-title} updates, creating a custom Ingress Controller can be helpful when maintaining a configuration manually that persists across cluster updates. |
| 10 | + |
| 11 | +This example provides a minimal spec for a custom Ingress Controller. To further customize your custom Ingress Controller, see "Configuring the Ingress Controller". |
| 12 | + |
| 13 | +.Prerequisites |
| 14 | + |
| 15 | +* Install the OpenShift CLI (`oc`). |
| 16 | +* Log in as a user with `cluster-admin` privileges. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Create a YAML file that defines the custom `IngressController` object: |
| 21 | ++ |
| 22 | +.Example `custom-ingress-controller.yaml` file |
| 23 | +[source,yaml] |
| 24 | +---- |
| 25 | +apiVersion: operator.openshift.io/v1 |
| 26 | +kind: IngressController |
| 27 | +metadata: |
| 28 | + name: <custom_name> <1> |
| 29 | + namespace: openshift-ingress-operator |
| 30 | +spec: |
| 31 | + defaultCertificate: |
| 32 | + name: <custom-ingress-custom-certs> <2> |
| 33 | + replicas: 1 <3> |
| 34 | + domain: <custom_domain> <4> |
| 35 | +---- |
| 36 | +<1> Specify the a custom `name` for the `IngressController` object. |
| 37 | +<2> Specify the name of the secret with the custom wildcard certificate. |
| 38 | +<3> Minimum replica needs to be ONE |
| 39 | +<4> Specify the domain to your domain name. The domain specified on the IngressController object and the domain used for the certificate must match. For example, if the domain value is "custom_domain.mycompany.com", then the certificate must have SAN \*.custom_domain.mycompany.com (with the `*.` added to the domain). |
| 40 | + |
| 41 | +. Create the object by running the following command: |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +$ oc create -f custom-ingress-controller.yaml |
| 46 | +---- |
0 commit comments