OpenShift - Patch Cluster Logging Management State

by
Jeremy Canfield |
Updated: December 14 2023
| OpenShift articles
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
By default, Cluster Logging Management State should be Managed.
~]$ oc get clusterlogging instance --namespace openshift-logging
NAME MANAGEMENT STATE
instance Managed
Which can also be seen in the Cluster Logging Instance YAML.
~]$ oc get clusterlogging instance --namespace openshift-logging --output yaml
apiVersion: v1
items:
- apiVersion: logging.openshift.io/v1
kind: ClusterLogging
spec:
managementState: Managed
The oc patch command can be used to update the Management State to Unmanaged.
~]$ oc patch clusterlogging instance --namespace openshift-logging --type merge --patch '{"spec":{"managementState":"Unmanaged"}}'
clusterlogging.logging.openshift.io/instance patched
Now, the Cluster Logging Management State should be Unmanaged.
~]$ oc get clusterlogging instance --namespace openshift-logging
NAME MANAGEMENT STATE
instance Unmanaged
Which can also be seen in the Cluster Logging Instance YAML.
~]$ oc get elasticsearch --namespace openshift-logging --output yaml
apiVersion: v1
items:
- apiVersion: logging.openshift.io/v1
kind: ClusterLogging
spec:
managementState: Unmanaged
Did you find this article helpful?
If so, consider buying me a coffee over at