Scaling Confluence & Synchrony Kubernetes Pods - Dynamically using Helm Chart
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
By default, the Confluence Helm Chart has a replica count set to 1 in the values.yaml file, which means only one Pod will be created for Confluence and Synchrony. To increase the replica count to 2 or more, thereby creating multiple Pods for Confluence and Synchrony and managing a multi-node architecture, you need to update this replica count value accordingly in the values.yaml file. Alternatively, you can update the StatefulSets dynamically to increase the Pod counts for Confluence or Synchrony.
Environment
Kubernetes
Solution
We have a couple of options for scaling the Confluence/Synchrony Pods. Here are the details:
1.) Scaling Confluence/Synchrony with Additional Pods - Dynamically Using StatefulSets
By default, Confluence and Synchrony have a replica count of 1 in the Helm chart's values.yaml
file. To increase the replica count and scale the Confluence/Synchrony Pods using StatefulSets, follow the steps below:
Once Confluence DC is up and running, you can scale Confluence/Synchrony Pods. First, check the StatefulSets by executing the following command:
1
% kubectl get sts
You should see a result where Confluence/Synchrony has 1 ready StatefulSet:
1
2
3
4
NAME READY AGE
statefulset.apps/confluencelocal 1/1 10m
statefulset.apps/confluencelocal-synchrony 1/1 10m
statefulset.apps/postgres-postgresql 1/1 10m
To increase the StatefulSets for Confluence/Synchrony, execute the following commands:
1
2
% kubectl scale sts confluencelocal --replicas 2
% kubectl scale sts confluencelocal-synchrony --replicas 2
After executing the above commands, the StatefulSets will increase to 2, and 2 Pods will be created for Confluence/Synchrony:
1
2
3
4
NAME READY AGE
statefulset.apps/confluencelocal 2/2 46m
statefulset.apps/confluencelocal-synchrony 2/2 50m
statefulset.apps/postgres-postgresql 1/1 10m
2.) Scaling Confluence/Synchrony with Additional Pods - Dynamically Using Helm Chart
You can also reapply the Helm chart using existing values and set the replica count dynamically by setting replicaCount=2
in the Helm upgrade command. The Helm Chart has the replicaCount
setting for Confluence and Synchrony with a default value of 1. When replicaCount=2
is set in the Helm upgrade command, the replica count will increase only for Confluence, scaling the Confluence Pod to 2 while the Synchrony Pod remains at 1. To scale the Synchrony Pod to 2 or more, explicitly set synchrony.replicaCount=2
in the Helm upgrade command. Use the following command:
1
helm upgrade confluencelocal atlassian-data-center/confluence --reuse-values --set replicaCount=2 --set synchrony.replicaCount=2
With the above command, both Confluence and Synchrony will have 2 Pods each.
Was this helpful?