GithubHelp home page GithubHelp logo

halkyon / aks-terraform Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10 KB

Showcases using Terraform to provision a new network and AKS cluster with nodes.

HCL 100.00%
aks terraform kubernetes azure microsoft cloud

aks-terraform's Introduction

Example AKS cluster using Terraform

This repository showcases using Terraform to provision a new network and AKS cluster with nodes within.

Install and configure

Ensure that kubectl, az, and terraform are installed first.

Initialise the Azure CLI if you haven't already:

az login

Setup variables

Fill out terraform.tfvars with the variables you'd like.

Required variables are location, and name, the Azure location/region, and name you'd like your cluster.

For reference, running az account list-locations -o table will get a list of regions to use.

Availability zones can be configured for high availability if the chosen region supports it. An example terraform.tfvars:

name               = "mycluster"
location           = "westus2"
availability_zones = ["1", "2", "3"]
node_count         = 3
min_count          = 3
max_count          = 6

Provisioning

terraform init
terraform apply

Configure kubectl

az aks get-credentials --resource-group mycluster --name mycluster

Test it works

kubectl get nodes -o wide

Tearing down

terraform destroy

What now?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.