(Optional) Scale up DataRobot application services¶
Taking periodic backups does not require stopping the DataRobot application. However, restarting the application is required if DataRobot was stopped prior to the backup. This guide describes how to scale the application services back up.
前提条件¶
-
The
kubectlutility (version1.23or compatible) must be installed on the host where you will perform these steps. See the kubectl documentation. -
kubectlmust be configured to access the Kubernetes cluster where the DataRobot application is running. Verify this with thekubectl cluster-infocommand.
手順¶
-
Export the name of the DataRobot application Kubernetes namespace to the
DR_CORE_NAMESPACEvariable. Replace<namespace>with your actual namespace:export DR_CORE_NAMESPACE=<namespace> -
If the services were previously scaled down correctly (with annotations preserving the original replica counts), scale them back up to their annotated state. The command also specifically scales
pcs-pgpoolto 3 replicas.for d_obj in $(kubectl -n $DR_CORE_NAMESPACE get deploy -o name -l release=dr); do r_count=$(kubectl -n $DR_CORE_NAMESPACE get $d_obj -o jsonpath='{.metadata.annotations.replicas}') if [ ! -z "$r_count" ]; then # Check if annotation exists and is not empty kubectl -n $DR_CORE_NAMESPACE scale $d_obj --replicas=$r_count else echo "Warning: Annotation 'replicas' not found or empty for $d_obj. Skipping scaling." fi done kubectl -n $DR_CORE_NAMESPACE scale deployments/pcs-pgpool --replicas=3 -
After the services have scaled back to their original state, remove the temporary
replicasannotations:for d_obj in $(kubectl -n $DR_CORE_NAMESPACE get deploy -o name -l release=dr); do kubectl -n $DR_CORE_NAMESPACE annotate $d_obj replicas- done