Upgrade GitLab Helm chart instances
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed
Upgrade a GitLab Helm chart instance to a later version of GitLab.
Zero-downtime upgrades are only available for cloud-native GitLab instances by using GitLab Operator.
Prerequisites
Before upgrading a GitLab Helm chart instance:
- Consult information you need before you upgrade.
- Because GitLab Helm chart versions don’t follow the same numbering as GitLab versions, see version mappings to find the GitLab Helm chart version you need.
- See the CHANGELOG corresponding to the specific release you want to upgrade to.
- If you’re upgrading from versions of the GitLab Helm chart version earlier than 8.x, see the GitLab documentation archives to access older versions of the documentation.
- Perform a backup.
Upgrade a GitLab Helm chart instance
To upgrade a GitLab Helm chart instance:
Consider turning on maintenance mode during the upgrade to restrict users from write operations to help not disturb any workflows.
Upgrade GitLab Runner to the same version as your target GitLab version.
Follow the deployment documentation step by step.
Extract your previously provided values:
helm get values gitlab > gitlab.yamlDecide on all the values you need to carry through as you upgrade. You should only keep a minimal set of values that you want to explicitly set and pass those during the upgrade process. You should otherwise rely on GitLab default values.
Perform the upgrade, with values extracted and reviewed in previous steps:
helm upgrade gitlab gitlab/gitlab \ --version <new version> \ -f gitlab.yaml \ --set gitlab.migrations.enabled=true \ --set ...During a major database upgrade, you should set
gitlab.migrations.enabledtofalse. Ensure that you explicitly set it back totruefor future updates.
After you upgrade:
- If enabled, turn off maintenance mode.
- Run upgrade health checks.
Upgrade the bundled PostgreSQL
Only perform these steps if you are using the bundled PostgreSQL chart (postgresql.install is true).
To upgrade the bundled PostgreSQL:
- Decide which version of PostgreSQL to upgrade to.
- Prepare the existing database.
- Delete existing PostgreSQL data.
- Update the
postgresql.image.tagvalue to the required version of PostgreSQL and reinstall the chart to create a new PostgreSQL database. - Restore the database.