Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Anyone using Bitbucket DC on Kubernetes that scaled more than 1?

Mark Hubers March 27, 2024

Does anyone have this working where you have more than one Bitbucket server (HA), and how did you deal with helm PersistentVolumeClaim?

The other idea I am thinking of is using one Helm release per Bitbucket instance on Kubernetes to get around this problem. This may even give me the option to upgrade one at a time or take one down when needed rather than using a rolling update that can go wrong and take down all the HA servers.  

Any ideas/tips/examples? 

 

1 answer

0 votes
Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2024

@Mark Hubers of course it is possible to scale Bitbucket StatefulSet to as many replicas as you need. What issues with a PVC do you face?

Mark Hubers March 27, 2024

The 2nd instance stays in pending mode as it says the PVC is used by another pod.  I have to setup the PVC outside of helm so that we can use EBS-CSI with snapshots and to never lose that data if someone delete the PVC.

 

I pass this to helm:

values = [
<<-EOT
volumes:
sharedHome:
mountPath: "/var/atlassian/application-data/shared-home"
customVolume:
persistentVolumeClaim:
claimName: ${local.pvc_shared_name}

localHome:
mountPath: "/var/atlassian/application-data/bitbucket"
customVolume:
persistentVolumeClaim:
claimName: ${local.pvc_localhome_name}
EOT
]

It seems if I use "
additionalVolumeClaimTemplates: []" that it create the PVC for me and I have no control over how that PV would be setup and if someone did a helm delete all our data is gone.
Am I crazy to overthink this? :)
Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2024

Shared home PVC must be RWX, yours is RWO - that's why the second pod can't mount it.

Mark Hubers March 27, 2024

The shared home is RWX and that one is getting mounted on the 2nd pod.  It is the local home that is RWO, as each bitbucket pod needs its own. 

bitbucket-sharedhome-pv 2Gi RWX Retain Bound bitbucket/bitbucket-sharedhome-pvc efs-sc  47h
pvc-c24e8df7-3b7d-4e98-95b6-8c2a4df18b35 20Gi RWO Delete Bound bitbucket/bitbucket-localhome-pvc ebs

I cannot find a way to give each bitbuket pod it own localhome using ebs-csi driver

Mark Hubers March 27, 2024

Or should I even care if the localhome gets deleted at times as I not clear what happens to things like cache data etc.

 

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2024

https://github.com/atlassian/data-center-helm-charts/blob/main/src/main/charts/bitbucket/values.yaml#L223 you need to set this to true which will enable volumeClaimTemplates in Bitbucket sts spec.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8
TAGS
AUG Leaders

Atlassian Community Events