Zero downtime migration of Azure Kubernetes clusters managed by Terraform

Terraform is an awesome tool when it comes to managing your infrastructure as code.
26 August 2020
Seamless Azure Kubernetes migration with zero downtime! Learn how with Terraform on our blog. Achieve uninterrupted operations.
Seamless Azure Kubernetes migration with zero downtime! Learn how with Terraform on our blog. Achieve uninterrupted operations.
gft-image-author-oleksandr-fesiuk.jpg
Oleksandr Fesiuk
Reading time
min
Share article
Terraform is an awesome tool when it comes to managing your infrastructure as code. You can create complex dependencies between resources in different kinds of cloud and on-prem infrastructure, all with a bunch of .tf files and providers.

First attempt

gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-1.png
gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-2.png

Possible solutions

Additional pool

Manual migration

Step 1: Create a new Agent Pool

gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-7.png
gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-3.png

Step 2: Cordon & Drain

gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-4.png

Step 3: Delete node pool

gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-5.png

Step 4: Reimport

tekst.png
gft-image-blog-zero-downtime-of-azure-kubernetes-clusters-6.png

Summary