Bootstrap FreeKB - OpenShift - Patch Elastic Search Management State
OpenShift - Patch Elastic Search Management State

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

By default, the Elastic Search Management State should be Managed.

~]$ oc get elasticsearch --namespace openshift-logging 
NAME            MANAGEMENT STATE   HEALTH   NODES   DATA NODES   SHARD ALLOCATION   INDEX MANAGEMENT 
elasticsearch   Managed            green    3       3            all 

 

Which can also be seen in the Elastic Search YAML.

~]$ oc get elasticsearch --namespace openshift-logging --output yaml
apiVersion: v1
items:
- apiVersion: logging.openshift.io/v1
  kind: Elasticsearch
  spec:
    managementState: Managed

 

The oc patch command can be used to update the Management State to Unmanaged.

~]$ oc patch elasticsearch elasticsearch --namespace openshift-logging --type merge --patch '{"spec":{"managementState":"Unmanaged"}}'
elasticsearch.logging.openshift.io/elasticsearch patched

 

Now, the Elastic Search Management State should be Unmanaged.

~]$ oc get elasticsearch --namespace openshift-logging 
NAME            MANAGEMENT STATE   HEALTH   NODES   DATA NODES   SHARD ALLOCATION   INDEX MANAGEMENT 
elasticsearch   Unmanaged          green    3       3            all 

 

Which can also be seen in the Elastic Search YAML.

~]$ oc get elasticsearch --namespace openshift-logging --output yaml
apiVersion: v1
items:
- apiVersion: logging.openshift.io/v1
  kind: Elasticsearch
  spec:
    managementState: Unmanaged



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 09bb06 in the box below so that we can be sure you are a human.