Install SonarQube on Kubernetes

How to install SonarQube on Kubernetes with use of Helm

SonarQube Code Quality and Security SonarQube screenshot

SonarQube Code Quality and Security

9,800 GitHub stars

How to Install SonarQube on Kubernetes with Helm

This guide will walk you through the process of installing SonarQube using Helm, the Kubernetes package manager, ensuring a smooth and efficient setup.

Prerequisites

Before we begin, ensure you have the following tools installed and configured:

  • Kubernetes - Installed locally or in a public cloud provider
  • kubectl - Configured to communicate with your Kubernetes cluster
  • Helm - For managing Kubernetes applications like SonarQube
  • Kubernetes Ingress controller - For accessing the installation on a url

Step 1: Add the Helm chart repository

First, add the repository containing the SonarQube helm chart:

helm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube
helm repo update
helm search repo sonarqube

Step 2: Create a namespace (optional)

Isolating applications within Kubernetes namespaces is a good practice. To deploy SonarQube in its own namespace:

kubectl create namespace sonarqube

Step 3: Install SonarQube using Helm

Now, you'll install SonarQube. The helm chart name is "sonarqube":

helm install sonarqube sonarqube/sonarqube --namespace sonarqube --create-namespace

Step 4: Verify the installation

After installation, verify that your SonarQube deployment is running smoothly:

kubectl get pods --namespace sonarqube
kubectl get all --namespace sonarqube

Step 5: Customize the SonarQube installation (optional)

This process may require customizing your deployment through a customized values.yaml file, which specifies configuration options.

helm install sonarqube sonarqube/sonarqube --values values.yaml --namespace sonarqube

Step 6: Access SonarQube

Accessing SonarQube will depend on your chosen service configuration (LoadBalancer, NodePort, or Ingress). For Ingress access, ensure an Ingress controller is operational in your cluster.

Follow the instructions in the helm install notes, the output of Step 3.

We can install SonarQube for you

Fully managed and 14 day free trial and 100% money back guarantee

Standard

$49 / month

  • Unlimited lines of code
  • Unlimited projects
  • 10GB storage
  • Email support
  • Custom domain with SSL
Start free trial

Premium

$149 / month

  • Unlimited lines of code
  • Unlimited projects
  • 100GB storage
  • Priority email support
  • Custom domain with SSL
  • Branch analysis
  • Pull Request decoration
  • Custom plugins
  • Developer or Enterprise edition (BYOL)
  • Single Sign-On integrations
  • Data migration
Start free trial

Custom

starts at $299 / month

  • Unlimited lines of code
  • Unlimited projects
  • Unlimited storage (25 EUR per 100GB)
  • Live chat (Slack) support
  • Custom domain with SSL
  • Branch analysis
  • Pull Request decoration
  • Custom plugins
  • Datacenter edition (BYOL)
  • Single Sign-On integrations
  • Data migration
  • High availability (SLA)
  • Special requirements
Contact us

Annual Get 2 months for free, 17% discount on a yearly plan!

We love open source

We contribute 10% of our revenue back to 61 open source projects

Directly to projects, via GitHub Sponsors and Open Collective.