Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKS Backup scenario in Terraform #158

Open
wants to merge 54 commits into
base: main
Choose a base branch
from

Conversation

HoussemDellai
Copy link
Contributor

This scenario shows how to create a backup of an existing AKS cluster and then use it to restore to a new cluster.

Steps to follow

  1. Deploy the AKS Landing Zone by following the steps in folder Scenarios/AKS-Landing-Zone.
  2. Provide the required input parameters in the Scenarios/AKS-Backup/terraform.tfvars file.
  3. Run the current Terraform templates to create a backup of the AKS cluster and a new cluster for restore:
cd Scenarios/AKS-Backup
terraform init
terraform apply
  1. Deploy a kubernetes deployment and persistent volumes to the original AKS cluster.
kubectl apply -f ./kubernetes/deploy_disk_lrs.yaml
kubectl apply -f ./kubernetes/deploy_disk_zrs_sc.yaml
  1. Trigger the backup of the AKS cluster on the azure portal through Vault backup.

You might need to click on the 'fix errors' button to resolve the backup misconfigurations.

  1. Watch for the resources created in the backup resource group (disk snapshots and blobs in the backup storage account).
  2. Trigger the restore operation to the new AKS cluster using the backup created in the previous step.

@@ -48,20 +48,20 @@ override.tf.json

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*
*.tfvars
# *.tfvars

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need these commented out?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file supposed to be here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another tfplan file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there supposed to be outputs here? if not do we need this file.

@@ -0,0 +1,3 @@
# Deploying the Hub and Landing Zone in one Terraform template

If you are looking for to deploy all resources, the Hub and Spoke components, in one `terraform` template, then the template presented in this folder will do exactly that. It will deploy all the 4 steps (`03-Network-Hub`, `04-Network-LZ`, `05-AKS-Supporting` and `06-AKS-Cluster`) as 4 modules.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the word "for" in the first part of this sentence.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another tfplan file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file? if not can we delete it?

@asalbers
Copy link

Would be good to see a sample test run or completion of a run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants