I’m trying to deploy sonarqube enterprise edition version 8.9.7.52159 in an AKS cluster on azure with three volumes for data, logs and extensions.
But whenever i deploy it, the pod comes up fine and then after about a minute, it crashes and then restarts and keeps restarting until i get the error CrashLoopBackOff. Please see my yml file above.
could you share some logs regarding the crash that you observed? Also please note that we offer a helm chart that you could use to get you started with sonarqube on k8s, but there are known problems with some azure specific storage classes
Thank you very much for responding. The logs won’t show because the pod is down. But the status says crashloopbackoff.
Also I want to deploy a 3 replica enterprise sonarqube in AKS and would like to know which volume type in Azure is suitable for having the 3 replicas connected simultaneously? Will the /data volume not be needed if there is a postgres database attached. What about the /extensions and the /logs volumes, can those go inside a database or they have to be stored on a volume?
Okay, regards the database addition, Will the /data volume not be needed if there is a postgres database attached. What about the /extensions and the /logs volumes, can those go inside a database or they have to be stored on a volume?
Also, I got the deployment to work. Turns out it was something to do with the storage class. The file system storage doesn’t work so i had to use azure disk. And even that did not work instantly, i was getting the error “0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaim” Then i used a storage class which had the volume binding mode set to “wait for first consumer” and the pod came up fine. So turns out that when i use a storage class with volume binding mode set to “immediate”, i get that error, but when the volume binding mode is set to “wait for first consumer” i don’t get the error and it works fine.
the data directory will hold the elasticsearch indeces. they will be recreated from the data in the database, but this takes some time and depending of the size of data that you expect in your instance, you may not want this. I personally don’t think there is a need for a extensions or logs PVC on k8s as you would stream the logs to stdout anyway and can configure centralized logging better that way. If you still want to persist the logs, a dedicated PV would be needed.
In regards to the storage class to be used and the errors that you see, this is more related to general k8s administration and is not specific to sonarqube. I already mentioned that you should only have 1 pod of Sonarqube running at a time, else you risk database corruption, loss of session data and general inconsistency.
As for the database versions you can get these information from our documentation: Prerequisites and Overview | SonarQube Docs
As you can see, Postgresql 14 is not yet supported. This does not mean that it does not work, but only that we did not do excessive testing that everything works so that we can guarantee this.
Nope. External elasticsearch is not supported in any edition of sonarqube. The datacenter edition can split search and app nodes but you still can not connect a external elasticsearch.