In this post on ArgoCD I am going to walk through deploying an app from ArgoCD to AKS.
First of all, you can deploy an app from the Argo CD web UI or CLI. Ready your application in a Git-based repository. It does not matter what source control system you use for your repository as long as it is Git-based. in our case we will use Azure DevOps to deploy an app. we need to point to a Git repository of either K8s manifest, Helm, or Kustomize. In this blog post I am going to keep it simple and use the simple nginx application
1- First step, we need to connect ArgoCD wtih Azure Devops
2- In the Argo CD web UI go to Settings> Repositories > CONNECT REPO USING HTTPS
3- Enter Git details
You have to get the credentials from Azure devops as the following - Read more -
4- Click on Connect
5- Click on context icon > Create Application
5- Enter Application details as the following
Automatic Pruning: By default (and as a safety mechanism), automated sync will not delete resources when Argo CD detects the resource is no longer defined in Git
Self-Healing: By default, changes that are made to the live cluster will not trigger automated sync
instead, you can update/create the application though manifest file/CLI
6- Click on Create
7- The Application got created and synced now
8- Done :)
Now, you can fully manage the application from Argo web portal or Argo CLI, you can check the logs, execute command on the pod, delete, scale,,,etc
As you can see from the snippet below, we can view and edit the deployment manifest file
Note: since we have enabled Automatic Pruning ANY CHANGES MADE AND NOT DEFINED IN GIT WILL BE DELETED/IGNORED
Consider this if you have enabled auto scale on the deployment!
so, let's made the changes from the repos, I will scale it from 4 to 8
ArgoCd triggered the changes and it will apply the changes directly.
let's check the logs of the pod
That wraps things up for this post. Check back soon for more posts on Argo CD, GitOps, Kubernetes, and Azure topics
Mohammad Al Rousan is a Microsoft MVP (Azure), Microsoft Certified Solution Expert (MCSE) in Cloud Platform & Azure DevOps & Infrastructure, An active community blogger and speaker.
Al Rousan has over 8 years of professional experience in IT Infrastructure and very passionate about Microsoft technologies and products.
Top 10 Microsoft Azure Blogs