Skip to main content

Migrating Crowd to Kubernetes

Kyungmin Park

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

💡
Crowd 5.3.0 → 5.3.7 → 6.3.1

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/crowd

Get values.yaml command

helm show values altassian-data-center/crowd --version 1.20.0 > values.yaml

Editing values.yaml

Modify according to your configuration.

Create namespace

kubectl create ns atlassian

Deploy helm chart

Crowd version: 5.3.0

helm install crowd \
 atlassian-data-center/crowd \
 -f values.yaml \
 -n atlassian \
 --version 1.20.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 Crowd data(application-data, shared-home) migration.

Data Migration

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

Migration strategy

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

Upgrade

Upgrade strategy

  • Option.1 : 5.3.7 to 6.3.1
  • Option.2 : 5.3.0 to 5.3.7

Option.1 Helm chart upgrade

  1. replicas 0(shutdown all Crowd pod)
  2. (Optional) Clear image.tag value
  3. Helm chart upgrade
  4. Crowd statefulset scaling(rolling upgrade not supported)
    1. replicas 1(for upgrade task)
    2. Switch to final replicas

Shutdown all Crowd pod

kubectl scale statefulset --replicas 0 -n atlassian crowd

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

(Optional) Clear image.tag value

If you previously set image.tag but the APP VERSION matches the version you want to upgrade to, proceed with this step.

image:

  # -- The Docker Crowd Docker image to use
  # https://hub.docker.com/r/atlassian/crowd
  #
  repository: atlassian/crowd

  # -- Image pull policy
  #
  pullPolicy: IfNotPresent

  # -- The docker image tag to be used. Defaults to appVersion in Chart.yaml
  #
  tag: ""

values.yaml

Helm chart

Crowd version: 5.3.7 → 6.3.1

helm upgrade crowd \
 atlassian-data-center/crowd \
 --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.

Option 2: Change image.tag & upgrade the Helm chart

  1. Edit image.tag in values.yaml (use 5.3.7 for minor version upgrade testing)
  2. replicas 0(shutdown all Crowd pod)
  3. Helm chart upgrade

Shutdown all Crowd pod

kubectl scale statefulset --replicas 0 -n atlassian crowd

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

Edit image.tag in values.yaml

image:

  # -- The Docker Crowd Docker image to use
  # https://hub.docker.com/r/atlassian/crowd
  #
  repository: atlassian/crowd

  # -- Image pull policy
  #
  pullPolicy: IfNotPresent

  # -- The docker image tag to be used. Defaults to appVersion in Chart.yaml
  #
  tag: "5.3.7"

values.yaml

Helm chart

Crowd version: 5.3.7 → 6.3.1

helm upgrade crowd \
 atlassian-data-center/crowd \
 --version 1.20.0 \
 -f values.yaml \
 -n atlassian

The chart version remains unchanged, only the image.tag has been modified.

🗒️
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.
The upgrade completed successfully despite a mismatch between the Helm chart's appVersion and the image.tag.

Reference

Products upgrade - Atlassian DC Helm Charts