SonarQube installation issue on AKS cluster

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
    I am using Community latest version to deploy SonarQube on AKS cluster(kubernestes version is 1.31,7)
  • how is SonarQube deployed: zip, Docker, Helm
    Using Helm
  • what are you trying to achieve
    We are trying to deploy SonarQube on AKS cluster, this worked properly before but now i am getting PodInitialization error
  • what have you tried so far to achieve this
    We tried to disable init-sysctl and init-fs and tried.
    We installed custom DNS and tried

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Kubectl describe pod sonarqube-sonarqube-0 output

Controlled By: StatefulSet/sonarqube-sonarqube
Init Containers:
init-sysctl:
Container ID: containerd://**********************
Image: **********************
Image ID: **********************
Port:
Host Port:
Command:
/bin/bash
-e
/tmp/scripts/init_sysctl.sh
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 255
Started: Tue, 20 May 2025 17:26:34 +0530
Finished: Tue, 20 May 2025 17:26:34 +0530
Ready: False

Kubectl logs sonarqube-sonarqube-0 output -f
Defaulted container “sonarqube” out of: sonarqube, init-sysctl (init), init-fs (init)
Error from server (BadRequest): container “sonarqube” in pod “sonarqube-sonarqube-0” is waiting to start: PodInitializing

kubectl logs pod sonarqube-sonarqube-0 -c init-sysctl
error: error from server (NotFound): pods “pod” not found in namespace “sonarqube”

Hey there.

Can you share your values.yaml file?

Hi Colin,
I am using the default values.yaml file only difference is below value
community:
enabled: true
buildNumber: “25.1.0.102122”

Alright.

Looking back at your first post, it looks like you used the wrong command to get logs from your pod.

Here’s how to correctly retrieve the “real” (main container) logs:

1. Check Pod Status
First, check if the pod is Running and ready:

kubectl get pods
# or for a specific namespace
kubectl get pods -n sonarqube

If STATUS is PodInitializing or ContainerCreating, you need to wait until it’s Running.

2. Get Logs from Main (sonarqube) Container
Once the pod is running, use:

kubectl logs sonarqube-sonarqube-0 -c sonarqube
# or follow logs live:
kubectl logs -f sonarqube-sonarqube-0 -c sonarqube

3. For Init Container Logs
If you’re troubleshooting initialization, get logs from init containers:

kubectl logs sonarqube-sonarqube-0 -c init-sysctl
kubectl logs sonarqube-sonarqube-0 -c init-fs

(You do not need to put pod in the command. The syntax is kubectl logs <pod-name> -c <container-name>). That’s why you’re getting the error pods “pod” not found occurs because you wrote kubectl logs pod sonarqube-sonarqube-0 -c init-sysctl. The pod name is just sonarqube-sonarqube-0, not pod sonarqube-sonarqube-0.