tree: b7c67fec53e33b67e071e13624e6669e15ab5fe3 [path history] [tgz]
  1. dependencies.md
  2. managed-updates.md
  3. README.md
  4. solr-cloud-crd.md
docs/solr-cloud/README.md

Solr Clouds

The Solr Operator supports creating and managing Solr Clouds.

To find how to configure the SolrCloud best for your use case, please refer to the documentation on available SolrCloud CRD options.

This page outlines how to create, update and delete a SolrCloud in Kubernetes.

Creating an example SolrCloud

Make sure that the solr-operator and a zookeeper-operator are running.

Create an example Solr cloud, with the following configuration.

$ cat example/test_solrcloud.yaml

apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCloud
metadata:
  name: example
spec:
  replicas: 4
  solrImage:
    tag: 8.1.1

Apply it to your Kubernetes cluster.

$ kubectl apply -f example/test_solrcloud.yaml
$ kubectl get solrclouds

NAME      VERSION   DESIREDNODES   NODES   READYNODES   AGE
example   8.1.1     4              2       1            2m

$ kubectl get solrclouds

NAME      VERSION   DESIREDNODES   NODES   READYNODES   AGE
example   8.1.1     4              4       4            8m

What actually gets created when you start a Solr Cloud though? Refer to the dependencies outline to see what dependent Kuberenetes resources are created in order to run a Solr Cloud.

Scaling a SolrCloud

The SolrCloud CRD support the Kubernetes scale operation, to increase and decrease the number of Solr Nodes that are running within the cloud.

# Issue the scale command
kubectl scale --replicas=5 solrcloud/example

After issuing the scale command, start hitting the “Refresh” button in the Admin UI. You will see how the new Solr nodes are added. You can also watch the status via the kubectl get solrclouds command:

watch -dc kubectl get solrclouds

# Hit Control-C when done

Deleting the example SolrCloud

Delete the example SolrCloud

$ kubectl delete solrcloud example

Solr Images

Official Solr Images

The solr-operator will work with any of the official Solr images currently available.

Build Your Own Private Solr Images

The solr-operator supports private Docker repo access for Solr images you may want to store in a private Docker repo. It is recommended to source your image from the official Solr images.

Using a private image requires you have a K8s secret preconfigured with appropriate access to the image. (type: kubernetes.io/dockerconfigjson)

apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCloud
metadata:
  name: example-private-repo-solr-image
spec:
  replicas: 3
  solrImage:
    repository: myprivate-repo.jfrog.io/solr
    tag: 8.2.0
    imagePullSecret: "k8s-docker-registry-secret"