DEV Community

Omkar Patil
Omkar Patil

Posted on • Originally published at omkarpatil.dev on

Azure AKS cluster from scratch using Terraform

While working on creating training material on Azure IaC using Terraform, I created a small demo project to create an Azure AKS cluster from scratch and integrated it with Terraform Cloud. It came out quite nicely and therefore I thought I would share it with larger audience 🙂.

Detailed instructions can be found on the repo README. You'll need your own Azure account and a subscription. The AKS cluster code is a local module and the created cluster will have the following features:

  • Nodes with Ubuntu OS
  • Azure CNI
  • Separate vnet and subnet
  • Single nodepool with autoscaling enabled
  • AKS managed Azure AD integration
  • System-assigned managed Identity
  • Cluster auto-upgrade enabled

Quick note about Terraform Cloud - if you haven't tried it yet, you should. It has a free plan for smaller teams up to 5 and provides a way to manage state remotely and securely.

Happy coding 🤘.

GitHub logo ospatil / k8s-azure-devops

Experiments with K8s, Azure and DevOps tools like Terraform

Kubernetes, Azure, Terraform and DevOps Sandbox

Base setup

  • Install Azure CLI: brew install azure-cli.
  • Install terraform: brew install terraform.

Initial Steps

Examples

Each subdirectory represents one scenario and usually corresponds to one TF Cloud workspace.

…

Top comments (0)