Skip to content
Automation to build a kubernetes DR cluster and restore workloads
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helm Initial commit Jun 10, 2019
kubeconfig Initial commit Jun 10, 2019
mock-ingresses Initial commit Jun 10, 2019
traefik Initial commit Jun 10, 2019
velero Initial commit Jun 10, 2019
00-check-availability.sh
00-show-vars.sh Initial commit Jun 10, 2019
01-create-rg.sh Initial commit Jun 10, 2019
02-create-keyvault.sh Initial commit Jun 10, 2019
04-create-aks-cluster.sh Initial commit Jun 10, 2019
05-install-helm.sh Initial commit Jun 10, 2019
06-install-traefik.sh Initial commit Jun 10, 2019
10-install-velero.sh Fixed doc Jun 10, 2019
11-restore-workloads.sh
12-install-mock-ingresses.sh Initial commit Jun 10, 2019
13-dns-to-dr.sh Initial commit Jun 10, 2019
99-dns-back-to-prod.sh Fixed doc Jun 10, 2019
99-tear-down.sh Initial commit Jun 10, 2019
LICENSE Initial commit Jun 10, 2019
README.md Fixed doc Jun 10, 2019
execute-dr.sh Initial commit Jun 10, 2019
namespaces Initial commit Jun 10, 2019
setenv

README.md

Create an AKS DR cluster

Overview

This is a collection of runbooks that create a DR kubernetes cluster on-the-fly:

  1. Create a resource group
  2. Create a keyvault
  3. Create an AKS cluster
  4. Install helm / tiller
  5. Install traefik (ingress controller)
  6. Install velero to point to the backups
  7. Restore namespaces listed in namespaces
  8. Tears down the whole cluster

Input data

The input data for the scripts are located in setenv:

  • REQUESTED_NAME: the name of the requested cluster
  • `SUBSCRIPTION': the Azure subscription-id where the cluster should be created
  • LOCATION: the azure location/region to provision resources
  • VM_SIZE: the cluster node vm size
  • AGENT_COUNT: the number of nodes
  • K8S_VERSION: the k8s version to be provisioned
  • ACME_CONTACT: your e-mail contact address for let's encrypt
  • PARENT_DOMAIN: the name of the parent domain (managed by the DNS zone)
  • MAIN_DC_IP: the IP of the production cluster
  • AZ_DNS_RG: the name of the resource group the DNS zone is in
  • AZURE_BACKUP_RESOURCE_GROUP: the resource group velero backs-up into
  • AZURE_STORAGE_ACCOUNT_ID: the ID of the velero storage account

Execution

  1. Edit setenv
  2. Run execute-dr.sh: this will create the cluster but not switch the prod DNS
  3. Run 13-dns-to-dr.sh to switch production to the DR cluster
  4. Run 99-dns-back-to-prod.sh to switch back the the production cluster
You can’t perform that action at this time.