So do you want to pacakge a pre-built index into a docker image and distribute that image to k8s? Or do you also need to index data to Solr live in k8s?
For the first case, where you periodically re-build an index and includes it in the image, Timo's Dockerfile inheritance could work well. Benefit is that you can use k8s ASG to add replicas easily. If you instead want a fully operational Solr cluster in k8s in which you can create collections, scale out, index content to live etc, then have a look at Solr Operator instead - https://solr.apache.org/operator/. It is more heavy-weight for sure, but it will spin up a Zookeeper cluster along with a SolrCloud cluster, and then you can point your application to that cluster through an ingress for index/query. Jan > 6. mai 2021 kl. 13:23 skrev Bjørn Kristian Larsen <[email protected]>: > > Hi, I need to move an existing solr instance to kubernetes. > > I am trying to write a Dockerfile to > 1. create a core > 2. load data > 3. run solr > > I am able to create a core from my existing config and run it with > "docker run -v myconf:/myservice solr:6.6 -c myservice -d /myservice" > > But i want to avoid saving that container to a new image and then reuse > that image in kubernetes. > > I would guess this is a common usecase but I can not find anything about it > here https://github.com/docker-solr/docker-solr > > Any help would be appreciated! > > Bjørn Larsen
