Scale the Artifactory HA Helm Installation Cluster
Scale Artifactory HA Helm cluster by setting artifactory.primary.replicaCount. Manage PostgreSQL password during scaling.
All pods in the Artifactory HA chart should serve as primary nodes. Set this flag:
--set artifactory.primary.replicaCount=${CLUSTER_SIZE}
instead of:
--set artifactory.node.replicaCount=${CLUSTER_SIZE}.
For a 4-pod cluster, set:
--set artifactory.primary.replicaCount=4.
Before Scaling
When scaling, explicitly pass the database password if it was auto-generated (the default with the bundled PostgreSQL Helm chart).
To get the current database password, use the following command.
export DB_PASSWORD=$(kubectl get $(kubectl get secret -o name | grep postgresql) -o jsonpath="{.data.postgresql-password}" | base64 --decode)Important
Use
--set postgresql.postgresqlPassword=${DB_PASSWORD}with every scale action to prevent a misconfigured cluster.
To Scale Up
To scale from 2 to 3 member nodes (4 nodes total):
# Scale to 4 nodes (1 primary and 3 member nodes)
helm upgrade --install artifactory-ha --set artifactory.primary.replicaCount=3 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha jfrog/artifactory-haTo Scale Down
# Scale down to 2 member nodes
helm upgrade --install artifactory-ha --set artifactory.primary.replicaCount=2 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha jfrog/artifactory-haNote
Because Artifactory runs as a Kubernetes StatefulSet, removing a node does not remove the persistent volume. Remove it explicitly as follows.
# List PVCs kubectl get pvc # Remove the PVC with highest ordinal! # In this example, the highest node ordinal was 2, so need to remove its storage. kubectl delete pvc volume-artifactory-node-2
Updated 24 days ago
