Provide a tutorial for running solr-operator on microk8s / minikube.
Is your feature request related to a problem? Please describe. Current Local Tutorial instructions don't work on microk8s or minikube.
Describe the solution you'd like It would be great to provide instructions on how to run solr-operator on microk8s / minikube. Docker-edge on macOS has a bug that results in very high CPU usage even when idle.
Additional context I followed the steps in the existing tutorial (plus some corrections) but this resulted in a non-functional Solr cluster.
The main issue seems to be that both microk8s and minikube use 10.x.x.x subnet for internal pod IPs (and each of them gets a different IP, unlike with Docker.app which seems to use 127.0.0.1 for all of them), and apparently the ingress configuration doesn't deal with it properly - in some cases I could use minikube tunnel to contact one of the nodes but it wouldn't be able to see any other node (or ZK).
Here's a draft write-up that I came up with for running solr-operator on microk8s:
==Solr-operator on microk8s==
- install microk8s
brew install ubuntu/microk8s/microk8s
- install microk8s components. This will also install Canonical Multipass service.
microk8s install
- Microk8s comes with its own version of
kubectlavailable viamicrok8s kubectlcommand. In order to use the externalkubectlcommand a proper config needs to be created for it:
cd ~/.kube
microk8s config > config
- you can view Kubernetes Dashboard by running this:
microk8s dashboard proxy
NOTE: this command runs in foreground and outputs the URL where the Dashboard can be viewed, as well as the security token needed to log in. Please also note that Chrome refuses to open this HTTPS URL because of invalid certificate, and it doesn't offer any option to proceed. You can bypass it by typing (anywhere) on the error page "thisisunsafe" - this will add the page to the Chrome's security exceptions.
- follow the remaining steps in the tutorial. NOTE: on a slow internet connection it may take several minutes to pull necessary images, so the first time a complete SolrCloud startup could take ~10 min.
Here's an example taken from a running Solr cluster that is nonetheless non-functional (and inaccessible):
bash-3.2$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 51m
example-solrcloud-common ClusterIP 10.152.183.22 <none> 80/TCP 28m
example-solrcloud-0 ClusterIP 10.152.183.55 <none> 80/TCP 28m
example-solrcloud-1 ClusterIP 10.152.183.11 <none> 80/TCP 28m
example-solrcloud-2 ClusterIP 10.152.183.245 <none> 80/TCP 28m
example-solrcloud-zookeeper-client ClusterIP 10.152.183.111 <none> 2181/TCP 28m
example-solrcloud-zookeeper-headless ClusterIP None <none> 2888/TCP,3888/TCP 28m
I think this is a great idea!
So my thoughts (not complete, just a first pass):
-
microk8s config > configThis is pretty heavy weight, kubectl supports parsing of multiple kube config files, so we can pipe to a separate file and add that to the environment variable. - We could not use ingresses in the basic example, and instead use kubectl port-forward. We would have a separate tutorial that explains how to use with ingresses/ExternalDNS. This should fix the IP issue for most people.
We are probably going to want to wait until this repo is migrated to apache/solr-operator before implementing new tutorials. That is the next milestone and all effort is going to making that happen currently. This (and other tutorial improvements) should certainly be one of the priorities after the migration is done.