learn-terraform

Course outlines for learning terraform.

View the Project on GitHub robertdebock/learn-terraform

Build infrastructure K8s cluster (Azure)

expected time requirements
60 minutes a computer

Goal: Learn how to create Azure K8s resources on Azure using Terraform.

Explanation

A Kubernetes cluster consists of many components. Creating one “manually” is time consuming and error prone.

Using Terraform to deploy a azurerm_kubernetes_cluster resource is quite simple.

Howto

Use azurerm_kubernetes_cluster to setup a K8s cluster. The documentation is a great starting point.

Demo

See this example repository.

Assignment

Use the sample code above and change these settings:

View the results

Azure Portal

Questions

  1. What would be a realistic node_count?
  2. What vm_size would be good?
  3. Was the cluster updated or recreated when changing the vm_size?
  4. Was the cluster updated or recreated when changing the node_count?