Blog Post

Apps on Azure Blog
3 MIN READ

Installation of Argo CD

VidyaSV's avatar
VidyaSV
Icon for Microsoft rankMicrosoft
Oct 17, 2024

Installation of Argo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It allows you to define the desired state of your applications using Kubernetes manifests and synchronize them with your cluster automatically. Argo CD also provides a web UI and a CLI to monitor and manage your deployments.

To install Argo CD on Azure, you need to have the following prerequisites:

- An Azure subscription and an active Azure account

- An Azure Kubernetes Service (AKS) cluster with at least two nodes and RBAC enabled

- The Azure CLI and the kubectl command-line tool installed on your local machine

- The Helm package manager installed on your local machine

The installation steps are as follows:

  1. Create an AKS cluster, with following settings –

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Login to respective subscription where we have the AKS cluster created with the below command

 Az account set –subscription <subscription-id>

  1. Install ArgoCD within in cluster

A Kubernetes namespace provides the scope for Pods, Services, and Deployments within the cluster. This ensures that users working within one namespace cannot see the contents of another namespace. In a Kubernetes cluster, namespaces help partition resources and isolate workloads, acting as virtual clusters within a physical cluster. This enables multiple teams or projects to operate independently.

Install Argo CD within the cluster:

  1. Create a namespace for Argo CD:

kubectl create namespace argocd

  1. Install Argo CD in the created namespace:

kubectl apply -n argocd -f [URL]

URL à https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

 

 

 

  1. Argo CD resources have been created. To check the status of the pods, use the following command:

kubectl get pods -n argocd

 

Argo CD will monitor the Git repository for any changes. If changes are detected, Argo CD will automatically update the GitOps tool. These changes will be reflected in the Kubernetes cluster.

To log in to the Argo CD platform, follow these steps:

  1. Retrieve the secrets:

kubectl get secrets -n argocd

 

  1. A secret is an object that stores sensitive information, such as the credentials that pods use to access services.

kubectl edit secret argocd-initial-admin-secret -n argocd

  1. Find the password in the argocd-initial-admin-secret file.
  2. Decrypt the password

echo <secret> | base64 -d

Base64 is an encoding and decoding technique used to convert binary data to an ASCII text format, and vice versa.

 

  1. Use the admin password to access the Argo CD UI.
  2. Retrieve the service information:

kubectl get svc -n argocd

 

A Service is an abstraction that represents a logical set of Pods and a policy for accessing them. Each Pod has a unique IP address, which is not exposed outside the cluster without a Service.

Edit the Argo CD server service:

kubectl edit svc argocd-server -n argocd

 

  1.  
    • ClusterIP: Used for Pod-to-Pod communication within the same Kubernetes cluster.
    • NodePort and LoadBalancer Services: Used for communication between applications within the cluster and external clients outside the cluster.
  2. Save the changes and run the service command again:

kubectl get svc -n argocd

 

The NodePort has been changed.

 

  1. Get the NodePort IP address:

kubectl get nodes -o wide

 

  1. Retrieve the NodePort external IP address.
    • IP address: 171.177.146.175
    • Port No: 31419

 

  1. If accessing 171.177.146.175: 31419 does not work, allow the port in Azure Security Group:
    • Go to the VMSS → Instances → Networking → Add inbound rules → Add Port

 

 

 

Refer to the site https://argo-cd.readthedocs.io/en/stable/getting_started/ for further information

Updated Oct 17, 2024
Version 2.0
No CommentsBe the first to comment