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 AWS S3 backup bucket.
00_backup_bucket01_iam_roles02_eks_cluster03_node_group04_eks_addons05_helm_releases
Access to the same AWS account and target EKS cluster.
AWS 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.
Install required dev tools
Run the following script.
cd bootstrap-scripts/ ./setup-devtools-aws.shSet
kubectlto the target EKS clusterTo set
kubectlto the target EKS cluster, run the following command.aws eks update-kubeconfig --region <aws-region> --name <cluster-name>Example:
aws eks update-kubeconfig --region us-east-1 --name <cluster-name>Verify the current cluster
Before proceeding, verify the context and cluster connectivity. Run the following command.
kubectl config current-contextInitialize OpenTofu
To initialize OpenTofu for the cluster module, run the following command,
cd deployment/iac/aws/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.pem
Feedback
Was this page helpful?