Skip to main content

Migrating Confluence to Kubernetes

Kyungmin Park

This document explains the process of migrating an existing Confluence installation to Kubernetes.

💡
Confluence 8.5.17 to 9.2.5

Pre-configured resources

Helm Chart

Version: v3.17.3(GoVersion: go1.23.7)

Add the Helm chart repository

helm repo add atlassian-data-center \
  https://atlassian.github.io/data-center-helm-charts

Check Atlassian product version with chart version

helm search repo atlassian-data-center/confluence

Get values.yaml command

helm show values altassian-data-center/confluence --version 1.22.0 > values.yaml

Editing values.yaml

Modify according to your configuration.

Create namespace

kubectl create ns atlassian

Deploy helm chart

Confluence version: 8.5.17

helm install confluence \
 atlassian-data-center/confluence \
 -f values.yaml \
 -n atlassian \
 --version 1.22.0

Check deployment

💡
The purpose of this initial startup is to intentionally enter an invalid database URL in order to create an empty Persistent Volume (PV) for Confluence data(application-data, shared-home) migration.

Data Migration

Process for importing existing application data and using it in the existing environment

Migration strategy

  1. Confluence deploy(replicas=1) with empty data(application-data, shared-home)
  2. Get application-data directory from as-is confluence instance(Rsync in to-be confluence pod)
  3. Get shared-home directory from as-is confluence instance(Rsync in to-be confluence pod)
  4. Confluence pod delete for restart
  5. Check confluence data
  6. Scale the Confluence pod from 1 to 2

Upgrade

Upgrade strategy

  1. replicas 0(shutdown all Confluence pod)
  2. Helm chart upgrade

Shutdown all Confluence pod

kubectl scale statefulset --replicas 0 -n atlassian confluence

For a Rolling upgrade, adjusting the replicas is not necessary.

Helm chart

Confluence version: 8.5.17 → 9.2.5

helm upgrade confluence \
 atlassian-data-center/confluence \
 --version 2.0.2 \
 -f values.yaml \
 -n atlassian
🗒️
During helm upgrade, pods are created based on the replicaCount in values.yaml, and the first pod performs the upgrade task.
The previous --replicas 0 setting is ignored.
After the rolling upgrade, don’t forget to click the Upgrade Complete button!

Reference

Products upgrade - Atlassian DC Helm Charts