Restoring the SSH keys and PCT from backed up Terraform state file

Complete the steps provided in this section to restore the SSH keys and PCT from a backed up Terraform state file of a deleted v1.1.0 jump box.

This section describes the procedure to rebuild a usable PPC v1.1.0 deployment workspace on a jump box from an existing cluster and a backed up Terraform state file.

Before you Begin

Ensure the following requirements are met.

  • The state file from all the following modules must be available on the Storage Account.

    • 00_backup_bucket
    • 01_iam_roles
    • 02_eks_cluster
    • 03_node_group
    • 04_eks_addons
    • 05_helm_releases
  • Access to the same Microsoft Azure account and target AKS cluster.

  • Azure CLI credentials with required permissions.

Perform the following steps to recover PPC

  1. Create a workspace.

    To create a working directory for PCT, run the following command.

    mkdir -p deployment
    cd deployment
    
  2. Download and extract the PCT

    Download the PCT package into the deployment directory and extract it.
    For more information about downloading and extracting the PCT, refer to Preparing for PPC deployment.

    After successfully extracting the template, this directory behaves as recovered installation workspace.

  3. Login to Microsoft Azure as a Service Principal

    To login to Microsoft Azure as a Service Principal, run the following command

    az login -u <username> -p <password> -t <tenant-id>
    
  4. Install required dev tools

    Run the following script.

    cd deployment/bootstrap-scripts
    ./setup-devtools-azure.sh
    
  5. Initialize OpenTofu

    To initialize OpenTofu for the cluster module, run the following command,

    cd deployment/iac/azure/cluster/modules/05_helm_releases
    tofu init
    
  6. Generate the SSH key for CLI access

    To generate the SSH key for CLI access

    tofu output -raw user_svc_private_key > ~/.ssh/user_svc.pem
    chmod 600 ~/.ssh/user_svc.pem
    
  7. Configure kubectl to communicate with the AKS cluster

    To configure kubectl to communicate with the AKS cluster, run the following command.

    az aks get-credentials \
    --resource-group aks-ppc \
    --name           base-test
    
  8. Verify the nodes and pods status

    To verify the nodes and pods status, run the following command.

    kubectl get nodes
    kubectl get pods -A
    

Last modified : July 30, 2026