Git Product home page Git Product logo

aks-appgateway's Introduction

Deploy an AKS cluster with an Application Gateway (Brownfield)

This sample terraform template deploys an AKS cluster with an Application Gateway.

  1. Deploy an Application Gateway
  2. Deploy an AKS cluster with 2 node pools
  3. Enable AKS Addon to deploy AGIC and attach Application Gateway
  4. Add Contributor role assignment for the AGIC Managed Identity (the AGIC addon missed this step although it works with Azure CLI)

It deploys AGIC using only the addon which won't use AAD Pod Identity. It works with both Kubenet and Azure CNI.

This sample was taken and changed from: https://docs.microsoft.com/en-us/azure/developer/terraform/create-k8s-cluster-with-aks-applicationgateway-ingress

Deploy the resources:

# login to Azure
az login
# deploy AKS & Application Gateway with Terraform
terraform init
terraform validate
terraform plan -out prod.tfplan
terraform apply prod.tfplan -auto-approve
# connect to AKS cluster
az aks get-credentials --name aks-cluster --resource-group rg-aks-cluster
# deploy sample app into AKS
kubectl apply -f aspnetapp.yaml
# view ingress resource
kubectl get ingress

Enable AGIC addon to deploy new Application Gateway

Here is an example:
https://peterdaugaardrasmussen.com/2021/12/04/terraform-how-to-set-up-azure-application-gateway-ingress-controller/
Another example:
https://thomasthornton.cloud/2021/10/25/creating-azure-kubernetes-service-with-application-gateway-ingress-using-terraform-and-deploying-a-sample-app/

aks-appgateway's People

Contributors

houssemdellai avatar

Watchers

 avatar

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.