SonarQube Kubernetes

I’m using Sonarqube 8.2 Enterprise
I’m trying to deploy SonarQube on kubernetes, i have deployment with persistent volume claim for opt/sonarqube/data and /opt/sonarqube/extensions to install new plugins and store them on persistent volume. When i deploy in this configuration, there is no plugins folder in opt/sonarqube/extensions dir and also there is no Quality Profiles when i check via web. As soon as i remove PVC for /opt/sonarqube/extensions and redeploy the app, Sonar creates plugins folder and Quality Profiles.
What is correct way to mount extensions dir to use default plugins and install new ones?

Hi @claer1984 ,

welcome to the community :wave:

we currently do not support k8s deployment for sonarqube, but want to work on this in the future (no ETA yet). The Problem with the plugins in this kind of deployment is already known. There is a hacky way around this: you define a list of plugins you want to have available in your installation and download them in another container to the pv that should contain all your plugins. you can take some inspiration from a community helm chart here (specific section).

i hope that helps :slight_smile:

1 Like

Hi @Tobias_Trabelsi! I am currently using the Community Edition of SonarQube 8.6 and have actually been working on getting the server deployed to a remote Kubernetes cluster.
I came across this question while debugging and was curious if this was still the case about SonarQube not supporting k8s deployments?

Thanks in advance!

Hello @Alexandra and welcome to you as well :wave:

yeah the situation is still similar but there were some improvements in the mean time. for example you only need to manually download the 3rd party plugins you want to have and you can to that via the marketplace as well. core plugins (language analyzers) are now shipped with the edition directly.

i know that there are already people running sonarqube in k8s so us not supporting this should not stop you from trying it out. you only need to understand that we will probably not be able to help much if something goes south