Restoring the SSH keys and PCT from backed up Terraform state file
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_bucket01_iam_roles02_eks_cluster03_node_group04_eks_addons05_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
Create a workspace.
To create a working directory for PCT, run the following command.
mkdir -p deployment cd deploymentDownload and extract the PCT
Download the PCT package into the
deploymentdirectory 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.
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>Install required dev tools
Run the following script.
cd deployment/bootstrap-scripts ./setup-devtools-azure.shInitialize OpenTofu
To initialize OpenTofu for the cluster module, run the following command,
cd deployment/iac/azure/cluster/modules/05_helm_releases tofu initGenerate 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.pemConfigure
kubectlto communicate with the AKS clusterTo configure
kubectlto communicate with the AKS cluster, run the following command.az aks get-credentials \ --resource-group aks-ppc \ --name base-testVerify the nodes and pods status
To verify the nodes and pods status, run the following command.
kubectl get nodes kubectl get pods -A
Feedback
Was this page helpful?