Loading video player...
Hello everyone, welcome back to my
YouTube channel. So in this video we are
going to discuss about Argo CD. Argo CD
is a GitHubsbased
continuous delivery tool and this tool
is specifically designed to manage your
Kubernetes cluster. What does it mean?
So basically you can deploy your
Kubernetes resources on Kubernetes
cluster using Argo CD but you cannot use
Argo CD to manage deployment on your
Azure web app, Azure container app.
Similarly for AWS and GCP so it is
specifically designed to make your life
easy while you are deploying your
resources or managing your resources on
Kubernetes cluster. So let's understand
in more detail.
So basically Argo CD follow Githops
principle and as we know Githops
basically follows DevOps best practices
and what's the principle of GitHubs? So
in GitHubs basically Git repository is a
single source of truth for your
application. What does it mean
basically? So whatever the configuration
or whatever the state you have in your
GitHub repositories same state same
configuration will be available or will
be deployed on your Kubernetes clusters.
So it basically continuously monitor uh
your kubernetes cluster state and same
time it also monitor your g repositories
and it's always sync whatever the
configuration or whatever the code you
have in your github repos same code will
be available or deployed on your
kubernetes clusters. So it basically
shrink the changes. Suppose you have
made some changes on your GitHub
repositories. Maybe you have changed
your docker image version like from
v_sub_1 to v_sub_2. As soon as you
commit your changes, Argo CD
continuously monitor your GitHub
repositories. It will see okay there are
some changes it will automatically
shrink that changes whatever you have
made on your GitHub repositories and it
will be deployed on your Kubernetes
clusters. So we can also say Argo CD is
a auto deployment tool because you are
not going to change or update anything
manually. You are just going to update
your changes on GitHub reposities and
your job is done. Argo CD will take care
and same thing if you are going to make
any changes on Aros or sorry on your
Kubernetes cluster directly then it will
automatically fix your GitHub code as
well. So it is vice versa like either
you are going to make changes on your
GitHub it will automatically shrink or
automatically deploy your changes on
coortis clusters and same time if you
are going to change anything directly on
kubert clusters it is going to fix those
changes on your github as well.
So now what problem basically aroc solve
if suppose you are not using argo cd
then what all the challenges you are
going to face. So for the very first is
no single source of truth because maybe
some of your engineers going to make
changes directly on Kubernetes clusters
and you are not aware who did what
changes. So there are no proper tracking
systems. So if you are using Argo CD
which is a GitHub tool it always track
who made what changes on your GitHub
repositories and if you want to do a
roll back it is quite easy to do a roll
back as well that we will see in
upcoming uh demonstration maybe after
few minutes manual update cause errors.
So if you are manually updating your
manifest file directly on your cluster
maybe in that case you might make
mistake and there are no tracking what
changes you have applied. So there are
chances if you are going to make
anything uh manually that definitely
uh those changes can cause uh issue on
your cluster on your application.
Git and cluster go out of sync. Maybe
you have some uh the current state
whatever state you have in your
kubernetes state or sorry on kubernetes
cluster same state you don't have in
your github so there is a mismatch in uh
in your manifest file maybe so there are
no mechanism to auto shrink your changes
so that's problem is also going to solve
by argo cd rollbacks are hard if you are
going to make suppose if you are not
using aroc then definitely you are going
to do manually update or maybe you have
set up a CI/CD pipeline then the whole
procedure you have to follow but if you
have to make a roll back roll back in
case of any issues but if you are using
Argo CD you are simply go to your Argo
CD dashboard and you can simply revert
the changes to the previous commit which
was working.
So these are the some benefits if you
are going to use Argo CD and these are
the drawbacks if you are not going to
use Argo CD.
All those things we are going to see in
demonstration as well. Now let's talk
about architecture of Argo CD. So there
are three main components in Argo CD.
The very first is API server. We call it
as a brain of Argo CD because it handle
all the communication.
error and another component we have
repository servers which is basically it
the the job of repository server is to
read your GitHub repos then only it is
going to make changes on your Kubernetes
clusters. Another one we have
application controller which basically
continuously compare your configuration
whatever you have in git and whatever
you have in co clusters. So it will it
will continuously monitor and sorry it
will continuously compare the
configuration if it find any difference
it is going to update those changes like
so whatever the current state you have
in cluster same state you are going to
have in your GitHub repos so these are
the three main components which used by
the Argo CD
now let's talk about the features of
ArgoD beautiful UI dashboards so you
will get a clear view of your
applications in real time like what
what's the health in case if as if is
there any issues everything you are
going to manage using a single dashboard
selfhealing if someone changes the
cluster manually auto or sorry Argo CD
uh can basically bring it back like
definitely you are going to make or
update those changes in GitHub as soon
as you update and Argo CD continuously
monitor your GitHub repos
and they find any differentiation in
your GitHub repo and in your Kubernetes
cluster, it is going to automatically
update those changes on your Kubernetes
clusters. So the state will remain same
in both in your GitHub and your
Kubernetes clusters. Automatic
deployment we already discussed
rollbacks also we have discussed and now
it uh you can not only use ML manifest
if you have helum charts that also
supports by argo cd if you have
customize json net or whatever manifest
you have they are going to support all
these manifest types multicluster
supports so you can deploy your
application on multiple cluster as well
using aroc CD.
Now let's see how we can install Argo CD
on Kubernetes clusters. So the very
first requirement to set up a Argo CD is
you should have up and running
Kubernetes clusters. So in our case we
have a cluster which we have enabled in
docker desktop. So like for learning you
can or hands-on basically you can
definitely use docker desktop. You
should not set up a AKS cluster or EKS
cluster which definitely going to cost
you. So for learning or hands-on purpose
you can use docker desktop.
So
let me open my docker desktop.
So we have Kubernetes cluster. You can
see the cluster status is active and
it's running. And this is a blank
Kubernetes cluster. If I will go to
command prompt and let me quickly check
if we have any pod deployed. UCTL get
pods. So we don't have any parts or any
application up and running. Now
let's verify one more thing. ubectl get
pods - a.
So you can see here we don't have any
pod up and running for argo cd. So these
are the default pod which basically used
by a kubern cluster when you enabled it.
So now let's set up a argod first. So
there are few steps which you have to
follow. So the very first thing you have
to set up a separate name space for
argod. So let me uh copy it.
So it is going to create a name space
called Argo CD. Next thing you have to
use this ML man ML file which you can
easily find on GitHub or you if you
simply uh type install
aru CD
and you can go on this documentation and
you can follow the steps as well. So the
very first thing is you have to create a
name space. Second you have to
download and install this ML file.
So let me open my command prompt. Let me
clear it.
So it is going to take couple of
seconds.
Okay. So you can see uh Argo CD
application controller for not this one.
This is network policy. Argo CD server,
Argo CD repo server, notifications. a
lot of uh things it is going to set up
for you.
So now let's see what next we have to
run. Let me go to my presentation. Okay.
Now we need to access this uh Kubernetes
sorry Argo CD dashboards. So for that
what we can do either you can expose or
you can use a load balancer as a service
type or you if if you want to test
locally you can simply do a port
forwarding. So let me do this port
forwarding.
So let's verify first uh the pod status.
Maybe it is going to take couple of time
sorry a couple of minutes. So cubectl
get pods a sorry not a small caps a
you can see the argo cd1 running and the
this is initializing. Okay, let's wait.
Pod is initializing. Okay, let's wait a
few minutes. Once all the pod of Argo CD
is uh the status will be up and running,
then we will do a port forwarding and
then we will browse the dashboard of
Argo CD.
Okay. So now you can see the status all
Argo CD ports are running in running
state. Now let's do a port forwarding.
So let me copy this. So basically we are
going to run on port 80 sorry 8080.
Okay. Uh cubectl port forward does not
have a named port
443. Okay. Let's verify the services
first. QTL get sbc.
Sorry.
Okay. So now we need to use a name space
as well which is Argo CD.
Okay. So here we have cluster IP which
is fine.
Let's change it to 8082 not 2 is also
there.
Sorry 8081 only because the Argo CD repo
server is okay. Let's try with 8081
first. So services argo CD- server does
not have a name port 443.
Okay. So, let's see. Port 80
that's 290.
And here we will use port 480.
Okay. So, let me copy this
and
okay. So, this is the Argo CD URL which
you will get and the username will be
default admin and password you have to
decrypt it. So for that let me open my
power cell.
Okay. Now let me if you will see here
one thing uh let me go to my uh
okay let me open new one otherwise it if
I will cancel it it is going to stop the
port forwarding cubectl get
sorry hyphen n and
so we have admin secret okay so now what
we need sorry argod secrets. So now what
we need we need to uh because whatever
the password we will have here that is
in encrypted form. So we need to decrypt
the password for that what I'm going to
use not this one.
So I'm going to use pass sorry a power
cell. So let me copy this
and let me paste it.
So this is the password you will get it.
You can see we have used arcd initial -
admin secret. So if I will go to uh
command prompt. So this is the one which
is going to have the password.
So let me copy the password first.
Okay. So this is the dashboard of Argo
CD. Now what you have to do the very
first thing you should have your GitHub
repositories
and you need to create a application. So
let me create application first. Let me
create any name maybe app one and
project name we will use default
synchronization policy. So we have two
options manual and automatic. We will go
with automatic. And here you we have
selfheal option as well. In case if you
are going to make any changes on
kubernetes cluster directly then it is
going to autoheal like it is going to
make the changes in your GitHub as well.
Okay. So now we need to define here
source. So source is going to your
GitHub repository. So let me open my
GitHub.
Okay, I will go with this repository
which is K K at fundamental and let me
go to in any one of day three. Let's go.
Okay. So here we have only one ML file.
Let me see another one.
Uh let's check A5.
Okay. So here we have multiple ML file.
So let me copy this and here I will
provide the GitHub repo link. So
you can see the revision head. It means
whatever the latest commit you will have
on this repositories it is going to take
uh that particular changes. If you have
any custom path, you can define it here
as well. Now in cluster details, let me
use my okay path is required. So let me
do one thing. Let me copy this. Sorry
name space. So nameace is must like you
should have nameace in your manifest
file. Without this it is not going to
work. So let me use default name space
here. I'm not sure if I have a name
space in manifest file. Let me do one
thing. Let me use day four because I
know on day four I have uh
name spaces defined in template. Let me
go to day four
and let me open deployment one. Okay. So
here we have name space. So okay let's
go with day four one.
Now let me quickly save it.
Sorry, let me quickly hit on create.
Unable to create application.
Application server for app one is
invalid. Okay, maybe let me remove this
name.
Okay. Now let me click on create.
Okay. So the problem was with GitHub
URL. Uh I should give a URL till my
repository which is create fundamental
because the day four folder path I have
already defined in path location. So you
can see as soon as I save you can see
the status here missing progressing and
synchronize. So as soon as what we did
we just simply define our GitHub repo
URL and it is going to automatically
deploy our resources on Kubernetes
cluster.
If I will click on this,
you can see this is the project which we
have created app and under this we have
two manifest file NX - deployment NX -
replica set. Now you can see in NX
deployment we have four number of
replica sets. So if I will go to
configuration here I have defined four
replicas of NX deployment. So if I will
go to app now we have here four replicas
of NGNX deployment and similarly for
here NX replica sets three
because in this configuration I should
have replica count three
three so you can see everything we can
see uh in single dashboard here you can
see the app health which is healthy
synchronization status is synchronized
and the head head is a last commits
which is 4759.
If I will go to my repos and uh let me
see what's the last commit I have made
4759. So the same commit it used 4759
and if you need to check like more
details you can simply go to particular
uh part and you see all the live
manifest here
and similarly if you need to check the
events and if you need to check the logs
so everything you are going to see in a
single dashboard. So if you are going to
use Argo CD definitely it is going to
benefits and this what we did is simply
we have connected to GitHub repos but in
real time definitely you are going to
use Argo CD which is a continuous
delivery tool along with any uh DevOps
tool either Jenkins or maybe Ashure
DevOps I will create the video on that
as well like we will set up a complete
end to end pipeline using Argo CD but
for now just want to give a quick brief
what is Argo CD and how we can set it up
and the simple application we have tried
to deploy it. Now let's see uh one more
thing here. Let me make some changes on
deployment hyphen NGNX file. Let me
directly edit it. Now what I'm going to
do I'm change going to change the
replica account 3. Now let's see what
happen
as soon as I will commit it. Let me go
back
and let me click on refresh.
So you can see it is going to shrink the
changes because you can see stats out of
sync. Now the status is shrink again.
Now you can see one pod is going to
delete because now we have specified
replica count three in deployment
manifest file. And if you will see a
last sync which is head or we can say a
commit ID E9. If I will go and check we
have a last commit ID which is E9. So
what we did we just simply make changes
on Kubern sorry on GitHub repos and it
is automatically deployed those changes
on Kubernetes cluster. We did we did
nothing here. So if you need to verify
it, let me open it and let's verify the
pod. QTL get ports. So you can see we
have a ngnx deployment and replica set
three uh deployment port three replica
sets. It means Argo CD is working fine.
So in and if you want to see
synchronization status, you can see all
these things here and health status also
you can simply monitor here.
And similarly you can create multiple
applications and uh multiple repos. So
the main thing here you should have a
separate repositories
for your manifest file. You should not
have a single repos where you have
application source code and your
manifest files as well. So it is not a
best practice. always create a separate
repositories for your manifest files
which you can directly link with uh or
you can directly add on your Argo CCD
dashboards and for security concerns you
can use SSOS OIDC everything you can
configure on Argo CD for security point
of views and you can use certificate as
well you can see for now I'm getting SSL
warning because I have not used any
certificates but if you want you can use
certificates as well so I hope it's
clear uh how Argo CD basically work and
it is very simple and straightforward
just you need to understand how you are
going to make changes while using a
CI/CD pipeline definitely we are going
to cover in upcoming videos so that's
all for today see you next video thank
you so
Welcome to this beginner-friendly guide to ArgoCD, the most popular GitOps tool for automating Kubernetes deployments! In this video, you’ll learn: ✅ What GitOps is and why it matters ✅ How ArgoCD works behind the scenes ✅ Key features like Sync, Hooks, Rollbacks & Health Checks ✅ How to set up ArgoCD on your Kubernetes cluster ✅ How to deploy your first application using a Git repo ✅ Best practices for GitOps workflows Whether you're a beginner exploring Kubernetes automation or a DevOps engineer looking to simplify CI/CD, this step-by-step explanation will help you understand ArgoCD quickly and clearly. #argocd #gitops #GitOps tutorial # argocd setup #devops #clouds #gitops #argocd tutorial #kubernetes