Cloud Infrastructure Community's Space

AKS #3: Install ArgoCD on AKS cluster

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. With ArgoCD, application definitions, configurations, and environments are declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand.


How to install ArgoCD on your AKS cluster

1. Install CLIs and tools

# install argocd CLI on Ubuntu 22.04
curl -sSL -o /usr/local/bin/argocd  
chmod +x /usr/local/bin/argocd
argocd version --client --short

2. Deploy ArgoCD on your AKS cluster

Before started, make sure you have valid AKS context and configured working context for kubectl.

# get AKS context and configured helm
az aks get-credentials --name $AKS_NAME --resource-group $AKS_RG
kubectl config use-context $AKS_NAME

Download argocd install.yaml file from epiHATR/azurekubernetes/install.yaml Create a k8s namespace where ArgoCD will be deployed on.

# create k8s namespace for argocd

kubectl create namespace argocd
kubectl apply -n argocd -f install.yaml

We will create a Ingress rule to allow access ArgoCD server, this require an Application Gateway Ingress Controller enabled on your AKS cluster. Create argocd-server-ingress.yaml file and paste following content:

kind: Ingress
  name: argocd-server-ingress
  namespace: argocd
  annotations: azure/application-gateway "http" "300"
  - http:
      - path: /
        pathType: Prefix
            name: argocd-server
              number: 80

Run following kubectl apply to deploy ingress to the K8S cluster

# run kubectl apply template
kubectl apply -f argocd-server-ingress.yaml
# Then check your deployed ingress

3. Login and verify ArgoCD server

After ArgoCD server was deployed to the AKS cluster, we can login to the ArgoCD server. We’ve created a public IP address pointing to your cluster and have an ArgoCD ingress deployed. Let’s use public IP address DNS name and default ArgoCD credentials to login

Get ArgoCD admin password
# grab argocd default password
hostname=$(az network public-ip show -n $PIP_NAME -g $AKS_RG --query ipAddress -o tsv)
password=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
Login with web browser

Open your browser and type hostname value grabbed from above command. You may asked to provide admin username and password

http://{your public ip address}

Login using ArgoCD Cli
# grab argocd default password
hostname=$(az network public-ip show -n $PIP_NAME -g $AKS_RG --query ipAddress -o tsv)
argocd login "${hostname}" --username admin --password $password

Source code

Source code for this article is now available at epiHATR/azurekubernetes/

Leave a Reply

Your email address will not be published. Required fields are marked *

Press ESC to close