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

:_mod-docs-content-type: PROCEDURE
[id="nw-dns-operator-managementState_{context}"]
= Changing the DNS Operator managementState

[role="_abstract"]
You can change from the default `Managed` state to `Unmanaged` to stop the DNS Operator from managing its resources in order to apply a workaround or test a configuration change.

The DNS Operator manages the CoreDNS component to provide a name resolution service for pods and services in the cluster. The `managementState` of the DNS Operator is set to `Managed` by default, which means that the DNS Operator is actively managing its resources. You can change it to `Unmanaged`, which means the DNS Operator is not managing its resources.

The following are use cases for changing the DNS Operator `managementState`:

* You are a developer and want to test a configuration change to see if it fixes an issue in CoreDNS. You can stop the DNS Operator from overwriting the configuration change by setting the `managementState` to `Unmanaged`.

* You are a cluster administrator and have reported an issue with CoreDNS, but need to apply a workaround until the issue is fixed. You can set the `managementState` field of the DNS Operator to `Unmanaged` to apply the workaround.

[NOTE]
====
You cannot upgrade while the `managementState` is set to `Unmanaged`.
====

.Procedure

. Change `managementState` to `Unmanaged` in the DNS Operator by running the following command:
+
[source,terminal]
----
oc patch dns.operator.openshift.io default --type merge --patch '{"spec":{"managementState":"Unmanaged"}}'
----

. Review `managementState` of the DNS Operator by using the `jsonpath` command-line JSON parser:
+
[source,terminal]
----
$ oc get dns.operator.openshift.io default -ojsonpath='{.spec.managementState}'
----
