Coder Social home page Coder Social logo

lab-tf-azure-aks's Introduction

Iac (Infrastructure as Code)

This repository contain terraform template to provision:

  • Azure Kubernetes Service (AKS)
  • Nginx Ingress
  • Prometheus
  • Weave Scope

Required Tooling

  • Terraform >= 0.12
  • Azure CLI >= 2.0

Pre-requisites

Create a service principal for AKS

az ad sp create-for-rbac -n "aks-sp" --skip-assignment

Update varaibles.tfvars file and add your service principal clientid and clientsecret as variables. Examples:

client_id = "2f61810e-7f8d-49fd-8c0e-c4ffake51f9f"
client_secret = "57f8b670-012d-42b2-a0f8-c3fakee239ad"

Provisioning

Run terraform init then terraform plan to see what will be created, finally if it looks good run terraform apply

terraform init
terraform plan -var-file=variables.tfvars -out=aks.tfplan
terraform apply aks.tfplan

Kubectl

Run the following commands to configure kubernetes clients:

terraform output kube_config > ~/.kube/aksconfig
export KUBECONFIG=~/.kube/aksconfig

Test configuration using kubectl

kubectl get nodes

Cleanup

You can cleanup the Terraform-managed infrastructure.

terraform destroy -var-file=variables.tfvars -force

lab-tf-azure-aks's People

Contributors

melvinlee avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ustabar

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.