Learn. Build. Share. Repeat.

Bootstrap your GitOps-enabled AKS cluster with Terraform: A code sample using the Flux v2 K8s Extension

2023-09-28 6 min read GitOps Kubernetes Developer Tutorial
In my previous posts, we learned how to get started with GitOps on AKS using the K8s extension for AKS. Then, we took a look at the Flux CLI and explored how it can be used to bootstrap your cluster and generate FluxCD manifests so that we can use GitOps to implement GitOps 🤯, and implemented Flux’s image update automation capability. From there, we built on the concept of image update automation, and showed you how you can use Flagger to automate canary deployments. Continue reading

Streamline Network Observability on AKS: A Step-by-Step Guide to enable the AKS add-on with Terraform

2023-07-10 11 min read Tutorial
Have you ever had to troubleshoot network issues in your Kubernetes clusters? If so, you know how challenging it can be to identify and resolve problems. To troubleshoot network issues you probably had to use a combination of tools like kubectl, tcpdump, wireshark, and netstat. The list goes on and on… While these tools are great for debugging and capturing network logs and traces, they don’t provide a holistic view of your cluster’s network traffic. Continue reading

Monitoring Azure Container Apps With Azure Managed Grafana

2022-09-09 10 min read Tutorial
The Azure Monitor team has announced the general availability of the Azure Managed Grafana (AMG) service. As part of the announcement, they also announced the availability of curated Grafana dashboards for various Azure services including Azure Container Apps 🎉 Grafana is very popular within the Cloud Native community and it seems natural to use it for Azure Container Apps (ACA) observability. In this post, I will walk you through provisioning the ACA and AMG resources using the Terraform AzAPI provider and show you how easy it is to import the ACA dashboards into your AMG instance. Continue reading

Terraform: Azure Container Apps with Azure Managed Grafana using the AzAPI provider

2022-09-09 3 min read Code snippets
Code snippet for the Monitoring Azure Container Apps With Azure Managed Grafana article. terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = ">=3.0.0" } azapi = { source = "azure/azapi" version = ">=0.5.0" } } } provider "azurerm" { features { resource_group { prevent_deletion_if_contains_resources = false } key_vault { purge_soft_delete_on_destroy = false } } } resource "random_pet" "aca" { length = 2 separator = "" } resource "random_integer" "aca" { min = 000 max = 999 } resource "random_string" "aca" { length = 5 lower = true upper = false numeric = true special = false keepers = { # Generate a new random_string on every run to avoid a conflict with the previous revision none = timestamp() } } locals { resource_name = format("%s", random_pet. Continue reading

Run Terraform With Azure Pipelines

2022-02-25 14 min read Tutorial
This repo will walk you through an approach to provisioning Azure resources using Terraform code stored in a Git repo and leverage Azure Pipelines (YAML-based) to deploy to dev, test, and prod environments (all in different subscriptions) with approval gates in front of test and prod environments. Prerequisites Azure Subscription If you don’t have Azure, go sign up for a free account and come back. Azure DevOps If you do not already have an Azure DevOps organization, follow these instructions to create one. Continue reading

Getting Started With Terraform on Azure

2021-04-24 7 min read Tutorial
Check out the official Get Started - Azure tutorial here Terraform basics Download and Install Download terraform from Extract the executable and add the folder to your PATH variable Open a shell and type terraform version The basic commands we’ll use are: terraform init terraform plan terraform apply terraform destroy I advise you to use the terraform fmt command often to ensure your scripts well formatted according to HashiCorp’s style conventions Continue reading