Skip to content

mohsin1217/Terraform_Azure_Kubernetes_Services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provision AKS cluster using Terraform via Service Principal

In this project, we will be creating AKS cluster the right way by using service principle.kubeconfig and service principle will be generated after the terraform plan and secret will be upload to keyvault to be used further.

Below resources will be created using this terraform configuration:-

  • Resource Group
  • Service Principle
  • AKS cluster using the SPN
  • Azure key vault to store the client secret
  • Secret uploaded to key vault

Pre-requisites

  • Terraform logged in in CLI using Token authentication
  • Azure CLI installed and logged in

Usage/Examples

1) login to the CLI

az login --use-device-code

2) set alias

alias tf=terraform

3) initialize the providers

tf init

4) Run the plan

tf plan

5) Apply the changes

tf apply --auto-approve

Refer below snaps for sample reference

image

image

image

image

image

image

About

Creating AKS cluster using Terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages