// Module included in the following assemblies:
//
// *ingress-controller-dnsmgt.adoc

:_mod-docs-content-type: PROCEDURE
[id="modifying-an-existing-ingress-controller_{context}"]
= Modifying an existing Ingress Controller for manual DNS management

[role="_abstract"]
As a cluster administrator, you can modify an existing Ingress Controller to manually manage the DNS record lifecycle.

.Prerequisites

* You have installed the {oc-first}.
* You are logged in as a user with `cluster-admin` privileges.

.Procedure

. Modify the chosen Ingress Controller to set the `dnsManagementPolicy` parameter:  
+
[source,terminal]
----
$ SCOPE=$(oc -n openshift-ingress-operator get ingresscontroller <name> -o=jsonpath="{.status.endpointPublishingStrategy.loadBalancer.scope}")
----
+
[source,terminal]
----
$ oc -n openshift-ingress-operator patch ingresscontrollers/default --type=merge --patch="{\"spec\":{\"endpointPublishingStrategy\":{\"type\":\"LoadBalancerService\",\"loadBalancer\":{\"dnsManagementPolicy\":\"Unmanaged\", \"scope\":\"${SCOPE}\"}}}}"
ingresscontroller.operator.openshift.io/default patched
----

. Verify that the Ingress Controller was modified correctly 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`.
