# Initial k8s deployment starts and stops immediately

**URL:** <https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788>\
**Category:** SonarQube Server / Community Build\
**Tags:** kubernetes\
**Created:** [July 21, 2021, 2:07am UTC](https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788 "2021-07-21T02:07:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantin](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@konstantin](https://community.sonarsource.com/u/konstantin)\
**Post date:** [July 21, 2021, 2:07am UTC](https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788/1 "2021-07-21T02:07:34Z")

</div>

Hi,

Could you please help us with the Sonarqube Kubernetes deployment.  
The container starts and stops instantly. I see no errors in the log.  
Please check the attachment for our logs in DEBUG mode.  
[sonar.zip](https://community.sonarsource.com/uploads/short-url/9UVwOcVGybMD05W6S4lpCsxxWsP.zip) (92.7 KB)

Environment:

- which versions are you using: sonarqube:8.9-community
- what are you trying to achieve: sonarqube running in kubernetes cluster and connected to MS SQL server
- what have you tried so far to achieve this: initial helm deployment considering [Deploy SonarQube on Kubernetes | SonarQube Docs](https://docs.sonarqube.org/8.9/setup/sonarqube-on-kubernetes/)

---

<div class="post-metadata">

**Author:** ![Tobias\_Trabelsi](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tobias_trabelsi/32/31755_2.png) [@Tobias\_Trabelsi](https://community.sonarsource.com/u/Tobias_Trabelsi)\
**Post date:** [July 21, 2021, 6:58am UTC](https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788/2 "2021-07-21T06:58:58Z")

</div>

Hi @konstantin and welcome to the community 👋

thank you for providing the logs.

> [@konstantin](#):
>
> 2021.07.19 04:46:59 INFO web[o.s.p.ProcessEntryPoint] Gracefully stopping process

this indicates that the SQ pod is stopped by the kube scheduler as it was probably marked as a failed deployment due to not being ready in time. can you try to increase the [failureThreshold](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/charts/sonarqube/values.yaml#L121) and/or increase the initial [limits](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/charts/sonarqube/values.yaml#L263) to speed up the startup process and retry?

---

<div class="post-metadata">

**Author:** ![konstantin](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@konstantin](https://community.sonarsource.com/u/konstantin)\
**Post date:** [July 22, 2021, 12:34am UTC](https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788/3 "2021-07-22T00:34:42Z")

</div>

> [@Tobias\_Trabelsi](#):
>
> this indicates that the SQ pod is stopped by the kube scheduler as it was probably marked as a failed deployment due to not being ready in time. can you try to increase the [failureThreshold](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/charts/sonarqube/values.yaml#L121) and/or increase the initial [limits](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/charts/sonarqube/values.yaml#L263) to speed up the startup process and retry?

Hi @Tobias_Trabelsi and thank you so much for your advice.  
It definitely helped:

> 2021.07.22 00:31:05 INFO ce[o.s.ce.app.CeServer] Compute Engine is operational  
> 2021.07.22 00:31:06 INFO app[o.s.a.SchedulerImpl] Process[ce] is up  
> 2021.07.22 00:31:06 INFO app[o.s.a.SchedulerImpl] SonarQube is up

I would prefer to have it somewhere in k8s documentation if it is not done yet.  
Thanks a lot! And have a great day.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [July 29, 2021, 12:34am UTC](https://community.sonarsource.com/t/initial-k8s-deployment-starts-and-stops-immediately/46788/4 "2021-07-29T00:34:56Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
