Hands on DevSecOps Coaching that is provided on AWS and Azure Cloud platforms. Contact Coach AK at devops.coaching@gmail.com for more info. You can also reach out to Coach AK at +1(469) 733-5248
Saturday, June 24, 2023
How to create AKS cluster using Terraform | Create Kubernetes Cluster using Terraform | How to Create Azure Kubernetes Cluster using Terraform
What is Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS) is a managed container orchestration service, based on the open source Kubernetes system, which is available on the Microsoft Azure public cloud. AKS allows you to quickly deploy a production ready Kubernetes cluster in Azure, deploy and manage containerized applications more easily with a fully managed Kubernetes service. We will see how to create AKS cluster in Azure cloud using Terraform.
AKS cluster can be created by many ways as mentioned below:
Creating an AKS resource with Terraform is incredibly easy, it only requires a single resource azurerm_kubernetes_cluster and in this post, we are going to walk through the necessary steps to create this with Terraform. We will create ACR and create a role with ACRpull assignment as well
Once the deployment is created, use kubectl to check on the deployments by running this command:
kubectl get deployments
To see the list of pods
kubectl get pods
Perform cleanup by deleting the AKS cluster
To avoid Azure charges, you should clean up unneeded resources. When the cluster is no longer needed, use terraform destroy command to remove the resource group, AKS cluster service, and all related resources.
Nice document, but we can commit this code to the github account then we can execute those commands, so that if anything goes wrong we can revert back those changes right
Thank you so much for this amazing article and video.
ReplyDeleteYou welcome, glad you liked it
DeleteNice document, but we can commit this code to the github account then we can execute those commands, so that if anything goes wrong we can revert back those changes right
ReplyDeleteyes, you can do it. you can check into any SCM tool
DeleteNice document, thank you.. can you please suggest how do we give vnet/subnet details in the terraform code?
ReplyDeleteThank you so much for this amazing article and video. Can you please share some videos and documents to upgrade existing AKS cluster.
ReplyDelete