Continuous Deployment using Argo CD

·

3 min read

Continuous Deployment using Argo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It automates the deployment and management of applications through Git repositories. Argo CD uses Git as the single source of truth for application definitions, configurations, and environments. This makes it easy to track changes, roll back deployments, and audit application deployments.

Argo CD offers a number of features that make it a powerful continuous delivery tool, including:

  • Declarative configuration: Argo CD uses declarative configuration files to define application deployments. This makes it easy to specify the desired state of an application, and Argo CD will automatically sync the live state to the desired state.

  • GitOps: Argo CD uses GitOps to manage application deployments. This means that all changes to application definitions are made through Git. This helps to ensure that all changes are tracked and auditable.

  • Automatic synchronization: Argo CD can automatically synchronize application state with the current version of declarative configuration. This eliminates the need to manually sync applications.

  • Visual feedback: Argo CD provides visual feedback on the status of application deployments. This makes it easy to see which applications are in sync, and which applications need to be synced.

Argo CD is a powerful continuous delivery tool that can help you to automate the deployment and management of applications on Kubernetes. It is easy to use, and it offers a number of features that make it a valuable tool for any Kubernetes deployment.

Here are some of the benefits of using Argo CD:

  • Increased reliability: Argo CD can help to improve the reliability of your applications by automating the deployment and management process. This can help to reduce the risk of human error and improve the overall stability of your applications.

  • Reduced costs: Argo CD can help to reduce the costs associated with managing your applications. This is because Argo CD can automate many of the manual tasks that are typically associated with application deployment and management.

  • Improved security: Argo CD can help to improve the security of your applications by automating the deployment and management process. This can help to reduce the risk of security vulnerabilities being introduced into your applications.

    Installation of Argo CD

  • 1- Create namspace for argocd

    kubectl create namespace argocd

  • 2-Install ArgoCD

    # Download the Argo CD image from docker hub and run

    docker pull argoproj/argocd:latest

    (or)

    kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    3-Check installed argocd with namspace

    kubectl -n argocd get all

    4- By default all services are in ClusterIP

  • To access ARGOCD dashboard "edit argocd-server"

  • kubectl -n argocd edit svc argocd-server

  • Replace ClusterIP with NodePort or LoadBalancer.

  • Here i am using NodePort

    5-Check the NodePort number kubectl -n argocd get svc

    6- Check node IP kubectl get nodes -o wide
    Access argocd dashboard using open http://<LoadBalancerIP>:<NodePort>

    7-login to Argocd. By default, the username and password are admin

    8- Connect git repository

    Copy and paste your Repository url

    9- Click "NEW APP"

    -->Select project name default from the list( you can create manually as well)

    -->SYNC POLICY (manual and automatic)

  • -->Choose Cluster ULR from dropdown list

  • -->Click the "Namespace" field and type default (use application's namespace)

    Click "CREATE"

10-Click "SYNC" (if you are using Automatic SYNC ..it will sync in few minutes automatically)

Get inside the application.

My Pods are running(i used 4 replicas )

11-Verify with terminal (i deployed in default namespace)

kubectl get all

Copy NodePort number and access with node's public IP

Sample Todo list App is running