For about 1 month, from 2023 - 2024 (so basically I was managing to work with the GitOps process) I’ve been learn something new for DevOps process. Even on this day its not really new but I would like to share my progress while working at the project.
ArgoCD: The magical wand to deploy K8s Cluster
Right now, I’ve been doing some jobs related to CD (Continous Delivery) using ArgoCD. ArgoCD was OSS that created by community, and now adopted byt the Linux Foundation which that CNCF (Cloud Native Computing Foundation).
For the task itself right now I’m researching how the flow of GitOps of my office did.
The process it self if I describe it, it more shown as:
The Apps it self will fetched by ArgoCD then deploy to the Kubernetes Cluster on the same namespace that will managed by ArgoCD.
What makes this tools useful its capability to pull every changes from Git repository which the base on the ArgoCD itself GitOps process that makes declarative for Kubernetes Deployment.
How I approach the process of GitOps using ArgoCD?
Well, after research using ArgoCD for deployment of the apps, I create a samples to do it, perhaps for readers who want to manage the process, you could try to access my Github Repository:
The name itself is API Laravel SRE Test, this was my playground to manage the application deployed to kubernetes and using automation without having too much involved from scratch.
Except from the other of my script which that is :
.
├── application-argocd.yaml
├── apps
│ ├── application-laravel.yaml
│ └── application-nginx.yaml
This 3 files I referred to my colleague that have been manage to create how to synchronize all services without having to manage it manually, and its only start with one simple command.
Step 1: Install the ArgoCD Server
Well you can install it on your local or on your cloud (EKS, GKE, AKS, or whatever it is). You can pass the step while you’re already have the Kubernetes Cluster. To install the ArgoCD:
kubectl apply -f <https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml>
After that you will have a bunch list of Policy, Deployments, Services, ReplicaSet etc.
While you’re done with that, because i deploy it on the local, try access the UI :
kubectl port-forward svc/argocd-server <port you want to expose>:443
This giving you the login page of ArgoCD. Get the password initial of your ArgoCD Dashboard.
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; ec
And now you’re log in the account, the username is admin
Step 2: Deploy the root application
So in well explained based on my POV, the Application Root was place of all application that deployed to the ArgoCD. Well that’s quiet explained, but specifically, the Application root its use for the automation to deploy all services without manual applying or manual add via the dashboard.
In my execution I execute the application-argocd.yaml
kubectl apply -f argocd/application-argocd.yaml
The logs will shown as “applications.argoproj.io/application-root unchanged” or other things like changed or not already deployed before. Then this execution will shown as services that we’re create before using Helm Charts.
This method I get from my senior DevOps, he’s manage for about maybe around 50 - 100 pods managed by ArgoCD and while I see it, the complexity of deployment to K8s can be simplified or easier way by automate the process it self.
I’m not preparing the cons while I doing this, but perhaps in the next posts I will try to make the research about the Cons by managed with the CRD Manifest of ArgoCD. If you have any inquiries or perhaps some questions about the project, please don’t hesitate to comment or contact to one of my social badges.
See you at the next blog :3