Skip to content

(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.

Prerequisites

  • The kubectl utility (version 1.23 or compatible) must be installed on the host where you will perform these steps. See the kubectl documentation.

  • kubectl must be configured to access the Kubernetes cluster where the DataRobot application is running. Verify this with the kubectl cluster-info command.

Procedure

  1. Export the name of the DataRobot application Kubernetes namespace to the DR_CORE_NAMESPACE variable. Replace <namespace> with your actual namespace:

    export DR_CORE_NAMESPACE=<namespace>
    
  2. 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-pgpool to 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
    
  3. After the services have scaled back to their original state, remove the temporary replicas annotations:

    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