1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/creating-a-custom-ingress-controller.adoc
2023-10-30 10:13:25 -04:00

49 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// *ingress-controller-dnsmgt.adoc
:_mod-docs-content-type: PROCEDURE
[id="creating-a-custom-ingress-controller_{context}"]
= Creating a custom Ingress Controller with the `Unmanaged` DNS management policy
As a cluster administrator, you can create a new custom Ingress Controller with the `Unmanaged` DNS management policy.
.Prerequisites
* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.
.Procedure
. Create a custom resource (CR) file named `sample-ingress.yaml` containing the following:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
namespace: openshift-ingress-operator
name: <name> <1>
spec:
domain: <domain> <2>
endpointPublishingStrategy:
type: LoadBalancerService
loadBalancer:
scope: External <3>
dnsManagementPolicy: Unmanaged <4>
----
<1> Specify the `<name>` with a name for the `IngressController` object.
<2> Specify the `domain` based on the DNS record that was created as a prerequisite.
<3> Specify the `scope` as `External` to expose the load balancer externally.
<4> `dnsManagementPolicy` indicates if the Ingress Controller is managing the lifecycle of the wildcard DNS record associated with the load balancer.
The valid values are `Managed` and `Unmanaged`. The default value is `Managed`.
. Save the file to apply the changes.
+
[source,terminal]
----
oc apply -f <name>.yaml <1>
----