Implementing Multi-Tier Application by Using ArgoCD

How can we help?
< All Topics
Print

Implementing Multi-Tier Application by Using ArgoCD

Brief Definition

ArgoCD is a tool that enables development teams to implement changes to applications in a Kubernetes cluster. This is done by utilizing a Git repository as the primary source to define and maintain the desired state of the application.

In this tutorial, we will discuss how to deploy a Multi-Tier application using ArgoCD.

Environment Setup

  • Create a Kubernetes cluster. This step will utilize a Kubernetes cluster created using RKE (Rancher Kubernetes Engine). Please refer to the following article to prepare your Kubernetes cluster.
  • You can install kubectl to interacting with related cluster..
  • Install ArgoCD by using or Manifest file.
    • kubectl create namespace argocd
    • kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    • Config ArgoCD to public expose using Ingress
    • Example:

      apiVersion: networking.k8s.io/v1
      kind: Ingress
      metadata:
          nginx.ingress.kubernetes.io/backend-protocol: HTTPS
          nginx.ingress.kubernetes.io/ssl-passthrough: 'true'
        name: argocd.ahmadcloud.my.id
        namespace: argocd
        resourceVersion: '6106299'
      spec:
        ingressClassName: nginx
        rules:
          - host: argocd.ahmadcloud.my.id
            http:
              paths:
                - backend:
                    service:
                      name: argocd-server
                      port:
                        number: 443
                  path: /
                  pathType: Prefix
        tls:
          - hosts:
              - argocd.ahmadcloud.my.id
            secretName: star.ahmadcloud.my.id
      

Application and Project Definition

  • Create ArgoCD project for multi-tier application
  • Specify the Git repository for each component (frontend, backend, and database)..
  • Configure access to Git repositories within ArgoCD. If you are using a private repository that requires access, please perform this configuration through the web UI.

Application Manifest Creation

  • Please obtain an example manifest file from the following repository: https://gitlab.com/ahmadnromiz/learn-argocd. In the manifest/overlay path, there are costumization files used for declarative custom workloads before deploying to the Kubernetes cluster.
  • The example of the base manifest file
  • The example of the overlay manifest file

Summary

ArgoCD facilitates efficient application deployment, automates the synchronization process, and ensures that the Kubernetes cluster is always in the desired state. Hopefully, this article provides insights and is beneficial for the smooth progress of your work.

Need more tutorial articles? Please visit our Knowledge Base page. Alternatively, you can also check out the CloudRaya blog for articles on various technologies.

References

  1. High Availability Kubernetes Using RKE in CloudRaya Part 1
  2. High Availability Kubernetes Using RKE in CloudRaya Part 2
  3. High Availability Kubernetes Using RKE in CloudRaya Part 3
  4. ArgoCD – Ingress Configuration
  5. ArgoCD – Getting Started
  6. Replatforming Apps to K8s with RKE and GitLab CIC
Table of Contents

Leave a Reply

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

Post comment

Ready, Set, Cloud

Ready, Set, Cloud