which versions are you using - latest charts (10.6.0 according to the github)(SonarQube, Scanner, Plugin, and any relevant extension)
how is SonarQube deployed: Helm
what are you trying to achieve - my goal is to install sonarqube enterprise edition on an aws cluster using helm
what have you tried so far to achieve this. I have used the helm chart connecting to an rds database. i get perpetually pending pods when persistence is enabled. also tried to deploy the chart as is and that also gets a pending pod for the PostgreSQL which I think holds up everything else
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
running kubectl logs sonarqube-sonarqube-0 -n sonarqube gives me
“Defaulted container “sonarqube” out of: sonarqube, init-sysctl (init)”
running kubectl logs sonarqube-sonarqube-0 init-sysctl -n sonarqube gives me nothing
Sonarqube Helm chart for community support · GitHub This helm chart(persistence disabled) works i.e the pod is running and ready, but i can’t reach the web server on the pod and instance IP. Ports are open at 9000
If the pods are healthy and up and running, port forwarding and access on localhost:9000 should work. Please make sure you don’t have SonarWebContext set; otherwise, you need to suffix that to the URL.
the persistency is optional and slightly improves performances, if you cluster does not have proper storage class this might be why the pods keeps being in the pending state.
Could you share a bit more info, like kubectl get pods and the error you get when accessing through port forwarding?
Web context is left empty. kubectl get pods -n sonarqube shows the pod running. added a screenshot. The error when accessing the pod IP is “cant reach, took too long to respond”. security group rules are open to 9000.
Your storage class is marked as default; nothing else should be required; we will troubleshoot this afterward.
With the Pod IP it makes sense that you cannot access it as it will not be exposed outside of the cluster unless you specify NodePort or LoadBalancer in the chart service type, which is not recommended for production as it would expose directly sonarqube without a reverse proxy, but this might help for debugging.
Else, I see the port-forwarding seems to work, at least it does not close automatically.
What happens when you curl localhost:8080 from the exact same machine/cloudShell you are running the port-forward?
Else you can try the full loop and install an ingress controller plus activate SonarQube helm chart ingress.
If you are not familiar with ingresses, I suggest you extensively read the concept and documentation; this is the critical software that will expose your application and can cause many security issues.
The workflow is indeed to deploy the ingress-nginx, which will create a loadBalancer kubernetes service. You’ll then have to properly configure your SonarQube DNS name to point to this loadbalancer IP, and then create the ingress and put the DNS name in the host section of the ingress.
Sure, you can activate it back, and when the pod will be pending, there are multiple commands to see what happens.
kubectl get events
kubectl describe pod/deployment
Those two commands with the name of the concerned object, should tell you why the pod is pending. If you do not have anything here, then you should take a look at the logs of your CSI controller.
LAST SEEN TYPE REASON OBJECT MESSAGE
35m Normal Scheduled Pod/sonarqube-sonarqube-0 Successfully assigned sonarqube/sonarqube-sonarqube-0 to ip-172-31-89-17.ec2.internal
35m Normal Pulling Pod/sonarqube-sonarqube-0 Pulling image "sonarqube:10.6.0-enterprise"
34m Normal Pulled Pod/sonarqube-sonarqube-0 Successfully pulled image "sonarqube:10.6.0-enterprise" in 53.696s (53.696s including waiting)
34m Normal Created Pod/sonarqube-sonarqube-0 Created container init-sysctl
34m Normal Started Pod/sonarqube-sonarqube-0 Started container init-sysctl
33m Normal Pulled Pod/sonarqube-sonarqube-0 Container image "sonarqube:10.6.0-enterprise" already present on machine
33m Normal Created Pod/sonarqube-sonarqube-0 Created container sonarqube
33m Normal Started Pod/sonarqube-sonarqube-0 Started container sonarqube
33m Warning Unhealthy Pod/sonarqube-sonarqube-0 Startup probe failed: Get "http://172.31.84.135:9000/api/system/status": dial tcp 172.31.84.135:9000: connect: connection refused
32m (x2 over 33m) Warning Unhealthy Pod/sonarqube-sonarqube-0 Startup probe failed: Get "http://172.31.84.135:9000/api/system/status": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
30m (x7 over 32m) Warning Unhealthy Pod/sonarqube-sonarqube-0 Readiness probe failed:
30m Warning Unhealthy Pod/sonarqube-sonarqube-0 Liveness probe failed:
12m Normal Killing Pod/sonarqube-sonarqube-0 Stopping container sonarqube
7m5s Warning FailedScheduling Pod/sonarqube-sonarqube-0 running PreBind plugin "VolumeBinding": binding volumes: pod does not exist any more: pod "sonarqube-sonarqube-0" not found