# Upgrading Sonarqube in kubernetes , currently on image 7.8-developer

**URL:** <https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726>\
**Category:** SonarQube Server / Community Build\
**Created:** [May 4, 2021, 2:51pm UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726 "2021-05-04T14:51:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeirdreRodgers](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deirdrerodgers/32/21893_2.png) [@DeirdreRodgers](https://community.sonarsource.com/u/DeirdreRodgers)\
**Post date:** [May 4, 2021, 2:51pm UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726/1 "2021-05-04T14:51:25Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- 7.8-developer
- upgrade to a newer version
- nothing yet but planning an upgrade.

Hi there,

I’ve been handed a sonarqube deployment to upgrade. I’m not familiar with the application and havent upgraded it before. We have it running as a deployment in a K8s cluster at present using a postgres rds (engine 9.6.20) and the image is 7.8-developer. I see that there is a LTS version at 7.9 but in docker hub that is marked as -community

> **[docker-library/official-images](https://github.com/docker-library/official-images/issues?page=2&q=label:library/sonarqube)**
>
> s

Is it possible to upgrade from 7.8 developer to 7.9 community ? eventually I want to get into the 8.x.x versions but I believe I first need to go via 7.9

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [May 4, 2021, 3:14pm UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726/2 "2021-05-04T15:14:42Z")

</div>

Hi, in term of upgrade path you indeed need to first upgrade to 7.9.

With every SonarQube upgrade, SonarQube will patch the database to migrate to the current version. This does not depend on the SonarQube edition (community, developer, etc), and the database schema is upgraded the same way, regardless of the edition.

So in term of database management, you are safe to upgrade to `7.9-community`, to then upgrade to `8.9-developer`.

Don’t forget to backup your database (as a safety net) before proceeding to the upgrade 👍

About K8s & docker in general, you want to pay attention to your volume management, make sure you don’t loose any custom plugins you may have. And you will need to not keep the `/data/es6/` folder, as we upgraded to elasticsearch 7. The elasticsearch indexes will be recreated during SQ startup, after the database migration completed.

---

<div class="post-metadata">

**Author:** ![DeirdreRodgers](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deirdrerodgers/32/21893_2.png) [@DeirdreRodgers](https://community.sonarsource.com/u/DeirdreRodgers)\
**Post date:** [May 5, 2021, 7:42am UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726/3 "2021-05-05T07:42:42Z")

</div>

@pierreguillot thank you so much, that is very helpful

---

<div class="post-metadata">

**Author:** ![DeirdreRodgers](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deirdrerodgers/32/21893_2.png) [@DeirdreRodgers](https://community.sonarsource.com/u/DeirdreRodgers)\
**Post date:** [May 11, 2021, 7:15am UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726/4 "2021-05-11T07:15:11Z")

</div>

@pierreguillot Hi again Pierre,

Just wondering about one thing when you mention " you will need to not keep the /data/es6/ "

Is this something I will need to manually delete? It looks like we have a deployment and its got two persistent volumes , one for plugins and one for a certificate. I was curious where the /data/es6 is mounted and if I need to change any config to have it deleted or will that just naturally happen when I upgrade?

---

<div class="post-metadata">

**Author:** ![pierreguillot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pierreguillot/32/46022_2.png) [@pierreguillot](https://community.sonarsource.com/u/pierreguillot)\
**Post date:** [May 11, 2021, 7:34am UTC](https://community.sonarsource.com/t/upgrading-sonarqube-in-kubernetes-currently-on-image-7-8-developer/42726/5 "2021-05-11T07:34:40Z")

</div>

Mounting the `/data/es6` folder is not mandatory. It’s documented [here](https://hub.docker.com/_/sonarqube) that you can mount this folder to a volume for persistence. If you don’t, SonarQube will “simply” rebuild it’s elasticsearch index during startup (if you recreate the container). The consequence for you is going to be a longer startup time, from less than a minute for a small database, to several hours for a huge one.

> [@DeirdreRodgers](#):
>
> if I need to change any config to have it deleted or will that just naturally happen when I upgrade?

If it’s not currently in a persistent volume, you don’t need to do anything. It will be recreated at startup.
