// Module included in the following assemblies:
//
// * networking/ingress-operator.adoc

:_content-type: PROCEDURE
[id="nw-create-custom-ingress-controller_{context}"]
= Creating a custom Ingress Controller

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.

This example provides a minimal spec for a custom Ingress Controller. To further customize your custom Ingress Controller, see "Configuring the Ingress Controller".

.Prerequisites

* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.

.Procedure

. Create a YAML file that defines the custom `IngressController` object:
+
.Example `custom-ingress-controller.yaml` file
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
    name: <custom_name> <1>
    namespace: openshift-ingress-operator
spec:
    defaultCertificate:
        name: <custom-ingress-custom-certs> <2>
    replicas: 1 <3>
    domain: <custom_domain> <4>
----
<1> Specify the a custom `name` for the `IngressController` object.
<2> Specify the name of the secret with the custom wildcard certificate.
<3> Minimum replica needs to be ONE
<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).

. Create the object by running the following command:
+
[source,terminal]
----
$ oc create -f custom-ingress-controller.yaml
----
