This guide provides step-by-step instructions to deploy ArgoCD on AKS using Terraform, facilitating a GitOps workflow on Azure.
- Kubectl: Installed. Download here: kubectl for Windows
- Azure CLI: Installed and authenticated with
az login
. - AKS Credentials (AKS is up and running): Obtain with
az aks get-credentials --resource-group myAksResourceGroup --name myAksCluster
. - Visual Studio Code Base64 Decode and Encode Extension: Installed for handling base64 decodings. Will be used to decode the initial ArgoCD admin password.
# Step 1: Initialize your Terraform workspace
terraform init
# Step 2: Generate and show an execution plan
terraform plan
# Step 3: Apply the changes required to reach the desired state of the configuration
terraform apply
# Step 4: Retrieve the ArgoCD default admin(username) password and decode it using Base64 extension
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}"
# Step 5: Destroy all resources created by the Terraform configuration
terraform destroy
Helpful Terraform Links: