GitOps, Kubernetes and ArgoCD
Video size:
Abstract
GitOps and ArgoCD
Have you ever modified something in your Kubernetes cluster and forgotten about it? Yeah, happens to the best of us.
GitOps practices help to eliminate some of these challenges as all the configuration is stored in Git....in other words, Git is the single source of truth.
In this talk, we will take a brief look at GitOps and ArgoCD and what they can do for you as a Cloud Engineer
Summary
-
Algo CD is a GitHub's continuous derivative tool for kubernetes. It uses GitHub's principles to deploy applications into kbernetes clusters. It allows us to have faster and safer deployments. Also allows for traceability and it makes it easy to eliminate configuration drifts.
Transcript
This transcript was autogenerated. To make changes, submit a PR.
Everyone, thanks for genius. My name is UTube and
I'll be talking on Githubs in Kubernetes with Algo CD.
So without further ado, let's get into it.
So what is GitHubs? Well, GitHubs is a continuous
delivery strategy. These, our infrastructure and application
configuration are defined as code and
stored in a vision control system like Git. So basically
it uses it as a single source of truth.
And what this means is that whatever is
defined in the Git repository is exactly what is deployed
in these cloud environment. So GitHub allows us to automate
cloud infrastructure using infrastructure as
code and software development best practices
such as git code review and CI CD.
There are a few advantages of well, there are a lot of advantages
of using GitHubs, but we will just outline a few.
First off, it allows us to have faster and safer
deployments, it gives us ease
of performing rollbacks, it allows for traceability
and it makes it easy to eliminate configuration drifts.
There are a lot of Gitops tools out these, but for the purpose
of these talk we will only be focusing
on Algo CD. So Algo CD is a declarative
GitHub's continuous derivative tool for kubernetes.
It is open source and basically
it uses GitHub's principles to deploy applications
into kubernetes clusters. Before we
take a look at exactly how Algo CD works,
let's take a moment to talk about push versus pull deployments.
So in a push deployment strategy, basically you
would have a CI CD pipeline that builds your application and
then updates your Kubernetes cluster
or redeploys or deploys the application into the
cluster. For example, you would have a Jenkins server
as your CI CD build tool. And then
whenever Jenkins builds your application, you need
to give Jenkins access to the cluster in order for you to
perform some Kubectl commands in order to
update your application. But this isn't entirely
safe because let's say your Jenkins server gets hacked,
the hacker would have access to your cluster. So in order
to solve this, that's where the pool deployment
strategy comes in. So basically you would have a
software deployed in your cluster which will pull the git repository
for changes, and if there's a change it
will redeploy the application. So how does ArgoCD works?
ArgoCD is implemented as a Kubernetes controller
and it continuously monitors the applications
running in your cluster and compares it to what is defined in git
repository. So basically it watches a
particular repository for changes, let's say you update the
version of a particular docker deployment
image, so Algo CD will detect that change and
implement the change in the cluster without
you having to do that manually. So any modifications made to the
desired target states in a Gitin repo can be automatically applied and
reflected in these specified target environment.
Let's take a look at some of the features of ArgoCd. So first
off, we have support for multiple config and
templating tools such as customize helm jsonnets and
plain Yaml. So however your application configuration is
defined, be it a helm chart or plain communities,
Yamu manifests, Ago CD is able to generate the correct
manifest from that and deploy that into a cluster.
So with ArgoCd we are able to manage and deploy to multiple clusters.
So you would only need to deploy ArgoCD into a single cluster,
and ago CD handles the deployment into any
other cluster you specify. We also have SSO
integration with GitHub, GitLab, Microsoft, LinkedIn,
et cetera. So by default, ArgoCD comes
with basic authentication using username and password,
but you have the ability to activate single sign on as
well. So in keeping to Gitops practices,
Ago CD allows us to roll back or roll anywhere to any
application configuration committed in Git repository. So basically
you would have the ability to roll back to previous states,
let's say maybe previous commits, that defines a
particular state of your applications. So ago city
comes with a web interface that allows us to visualize the health status
of the resources deployed in your cluster. So let's actually take
a look at what this web interface looks like.
So here we have the ArgocD web UI, and you can see I have
three applications deployed, the CLI app, the declarative app,
and these helm demo. So ago CD detects that one of these
applications is out of sync, which means that what is deployed in the
cluster doesn't match what is specified in the git
repository. And it gives me the option to sync this manually.
But I can also configure ago CD to do this automatically,
and it detects that the declarative app and the helm demo are all
healthy. So here in the ago city web UI
I can do pretty much anything. I can create
new applications, new deployments, I can roll back the deployment,
I can sync application, et cetera.
So ago city also comes with a command line tool,
the Ago CD CLI. And using this we can also create
applications. We can roll back a particular deployment
we can sync after as well. Yeah,
okay, so ago CD also gives us.
Automate enables us to detect configuration drifts
like we said before. So if a particular state
of deprecations deployed in these cluster doesn't match
what's in the Giz repository, ArgoCD detects us as
well. So ago CD.
We also have webhook integration with GitHub basebuckets
and GitLab. And Ago CD allows us to override
certain parameters. Let's say you deployed a helm charts with
algo CD. You would be able to override
these helm values using Algo CD.
Yeah, so that's been my talk. Thanks for listening and
I hope you learned a lot.