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

59 lines
1.9 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 an Ingress Controller for manual DNS management
[role="_abstract"]
As a cluster administrator, you can create a new custom Ingress Controller with the Unmanaged DNS management policy.
.Prerequisites
* You have installed the {oc-first}.
* You are logged in as a user with `cluster-admin` privileges.
.Procedure
. Create an `IngressController` custom resource (CR) file named `sample-ingress.yaml` with the following content:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
namespace: openshift-ingress-operator
name: <name>
spec:
domain: <domain>
endpointPublishingStrategy:
type: LoadBalancerService
loadBalancer:
scope: External
dnsManagementPolicy: Unmanaged
----
+
where:
+
`metadata.name`:: Specify the `<name>` with a name for the `IngressController` object.
`spec.domain`:: Specify the `domain` based on the DNS record that was created as a prerequisite.
`loadBalancer.scope`:: Specify the `scope` as `External` to expose the load balancer externally.
`loadBalancer.dnsManagementPolicy`: Specifies 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`.
. Apply the manifest to create the `IngressController` object:
+
[source,terminal]
----
$ oc apply -f sample-ingress.yaml
----
. Verify that the Ingress Controller was created with the correct policy by running the following command:
+
[source,terminal]
----
$ oc get ingresscontroller <name> -n openshift-ingress-operator -o=jsonpath={.spec.endpointPublishingStrategy.loadBalancer}
----
+
Inspect the output and confirm that `dnsManagementPolicy` is set to `Unmanaged`.