apache / solr-operator

Official Kubernetes operator for Apache Solr
https://solr.apache.org/operator
Apache License 2.0
242 stars 112 forks source link

Uninstalling solr helm chart without uninstalling Zookeeper #665

Open brickpattern opened 6 months ago

brickpattern commented 6 months ago

hi - this is more of a general Q.

I installed Solrcloud with these options to use a ZK-operator installed seperately. --set zookeeper-operator.install=false --set zookeeper-operator.use=true

On "helm uninstall solr" ... the ZK pods created using solrcloud say solr-solrcloud-zookeeper-0/1/2 gets deleted as well.

Is there a way to retain the ZK pods created as part of solrcloud and just remove the solr pods?

Alternatively, if i had started off with solrCloud helm chart managing zookeeper pods, how to decouple the ZK from that installation? with operational config files on ZK, can the solrCloud pods be moved off to a standalone ZK?

HoustonPutman commented 6 months ago

So if you deploy Solr using the "provided" zookeeper, then it will be managed in tandem with your SolrCloud. If you want the Zookeeper Cluster's lifecycle to be independent of the Solr lifecycle, you will need to manage it separately.

I would recommend in that case to use the Bitnami Zookeeper Helm chart rather than the Zookeeper Operator's offering. https://artifacthub.io/packages/helm/bitnami/zookeeper

You would install that by itself, and then find the Zookeeper connection String. Then in the Solr helm values file, you would use that as the "zk.address" option (and not provide any "zk.provided.*" option). See the solr helm chart's options for more details: https://artifacthub.io/packages/helm/apache-solr/solr#zk-options

brickpattern commented 6 months ago

If i had started with inbuilt ZK, would the above approach of specifying zk.address for a standalone ZK will still work?

I would like to retain the data in the solrCloud when cutting over to new ZK.

janhoy commented 6 months ago

You could call the BACKUP API in order to backup the content from Zookeeper, then RESTORE once you have the new cluster and ZK installed. Or you can find one of the Zookeeper commandline utilities out there (search for it) which will let you backup/restore the content of ZK.