Installation of Argo CD

  • Thread starter Thread starter VidyaSV
  • Start date Start date
V

VidyaSV

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 –

VidyaSV_0-1729154889145.png



VidyaSV_1-1729154889151.png





VidyaSV_2-1729154889156.png







VidyaSV_3-1729154889160.png





VidyaSV_4-1729154889163.png



VidyaSV_5-1729154889168.png



VidyaSV_6-1729154889172.png







  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

VidyaSV_7-1729154889182.png



VidyaSV_8-1729154889187.png





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

kubectl get pods -n argocd

VidyaSV_9-1729154889198.png



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

VidyaSV_10-1729154889205.png



  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

VidyaSV_11-1729154889207.png



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

VidyaSV_12-1729154889210.png



    • 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.
  1. Save the changes and run the service command again:

kubectl get svc -n argocd

VidyaSV_13-1729154889211.png



The NodePort has been changed.



  1. Get the NodePort IP address:

kubectl get nodes -o wide

VidyaSV_14-1729154889214.png



  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

VidyaSV_15-1729154889221.png



VidyaSV_16-1729154889225.png





Refer to the site Getting Started - Argo CD - Declarative GitOps CD for Kubernetes for further information

Continue reading...
 
Back
Top