Logo

dev-resources.site

for different kinds of informations.

ArgoCD Getting Started - Hands On

Published at
5/5/2024
Categories
argocd
devops
kubernetes
tutorial
Author
ruanbekker
Categories
4 categories in total
argocd
open
devops
open
kubernetes
open
tutorial
open
Author
10 person written this
ruanbekker
open
ArgoCD Getting Started - Hands On

In this tutorial I will show you how to get started with ArgoCD on Kubernetes and we will cover the following topics:

  • How to provision a local Kubernetes cluster.

  • How to deploy ArgoCD on Kubernetes using Helm.

  • How to grant ArgoCD access to you Private Github Repositories.

  • How to configure your application sets on Github, and how to deploy applications to your cluster.

  • How to get started with RBAC to create a local user.

  • How to setup SSO with Authentik.

  • How to use Argo CD Notifications using Email.

Pre-Requisites

To follow along in this tutorial you will need the following

Install a Kubernetes Cluster

If you already have a Kubernetes Cluster, you can skip this step.

Define the kind-config.yaml



kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
    listenAddress: "0.0.0.0"
  - containerPort: 443
    hostPort: 443
    protocol: TCP


Enter fullscreen mode Exit fullscreen mode

Then create the cluster with kind:



kind create cluster --name example --config kind-config.yaml


Enter fullscreen mode Exit fullscreen mode

ArgoCD Installation

You can deploy Argo CD using the kubernetes manifests and deploy them with kubectl or you can deploy them with helm.

I will be deploying Argo CD using Helm, the reason for that is, I would eventually like to manage my argo deployment using Argo CD, and I have found when deploying it initially using manifests, it was not as smooth as compared to helm.

So to start deploying Argo CD with Helm, so first we will need to add the helm chart repository where the chart is hosted:



helm repo add argo https://argoproj.github.io/argo-helm


Enter fullscreen mode Exit fullscreen mode

Then we can find the latest version using the following:



helm search repo argo/argo-cd
# NAME          CHART VERSION   APP VERSION DESCRIPTION
# argo/argo-cd  6.0.13          v2.10.0     A Helm chart for Argo CD


Enter fullscreen mode Exit fullscreen mode

Now since we have the version, we can get the default values and redirect the output to a file:



helm show values argo/argo-cd --version 6.0.13 > values.yaml


Enter fullscreen mode Exit fullscreen mode

I only have one config parameter that I want to change and the rest I want to keep at defaults, so I am only defining this as my values.yaml:



---
configs:
  params:
    server.insecure: true


Enter fullscreen mode Exit fullscreen mode

Now we can deploy argo cd to our cluster:



helm upgrade --install argocd argo/argo-cd \
  --version 6.0.13 \
  --values values.yaml \
  --namespace argocd --create-namespace


Enter fullscreen mode Exit fullscreen mode

We can monitor our installation and ensure that all the pods are running in the argocd namespace:



kubectl get pods -n argocd


Enter fullscreen mode Exit fullscreen mode

Once the pods are running, we can retrieve the argo cd admin password from a kubernetes secret:



kubectl get secret argocd-initial-admin-secret -n argocd \
  -o jsonpath="{.data.password}" | base64 -d


Enter fullscreen mode Exit fullscreen mode

Now that we have the secret we can create a port-forward session so that we can access the argo cd frontend:



kubectl -n argocd port-forward svc/argocd-server 8080:80


Enter fullscreen mode Exit fullscreen mode

Access the UI on http://localhost:8080

argocd-tuturial

Once we login we should see this:

argocd-tuturial

You will see a blank canvas, we do see an option to create an application via the user interface, but we are not going to use this as we will define all our resources in a declarative manner.

Continue Reading

To access the rest of this post, feel free to see the updated version on my blog:

argocd Article's
30 articles in total
Favicon
CloudOps Challenge - Real-Time Projects
Favicon
Automating PostgreSQL Clusters: A Guide to Deployment with ArgoCD and CloudNativePG
Favicon
Crafting a Multi-Environment CI/CD Pipeline: A Hands-on Guide with Tekton and ArgoCD
Favicon
Leveraging ArgoCD for Kubernetes Applications: Implementation, Use Cases, and Best Practices
Favicon
Make ArgoCD authenticated using AWS Cognito
Favicon
Crossplane + ArgoCD: A Perfect Match for Kubernetes Automation
Favicon
GitOps + ArgoCD: A Perfect Match for Kubernetes Continuous Delivery
Favicon
CI/CD Pipeline for a Next.js Application Using GitHub Actions, ArgoCD, and MicroK8s
Favicon
A Production Ready EKS Deployment with GitOps - Part 1 - Introduction
Favicon
Deploy Github Actions y Argo CD
Favicon
Implemeting GitOps with Argocd
Favicon
Deploying Applications with GitHub Actions and ArgoCD to EKS: Best Practices and Techniques
Favicon
Day 23 of my 90-day Devops journey: Embracing GitOps Principles with Argo CD with Hello world project
Favicon
Deploying applications to Kubernetes with Gitlab CI/CD,Helm Charts and ArgoCD
Favicon
Cรณmo Instalar Argo CD
Favicon
Continuous Deployment to Kubernetes with ArgoCD
Favicon
Rendering the TRUE Argo CD diff on yourย PRs
Favicon
ArgoCD Getting Started - Hands On
Favicon
Integrating Multiple EKS Clusters with ArgoCD for Simplifying Kubernetes Operations
Favicon
Managing database migrations in ArgoCD ๐Ÿ™
Favicon
ArgoCD Deployment on RKE2 with Cilium Gateway API
Favicon
Beginner's Guide to Argo CD: Streamlining Kubernetes Deployments with GitOps
Favicon
Building a CD Pipeline with GitOps and ArgoCD ๐Ÿ› ๏ธ
Favicon
Introducing ArgoCD: A GitOps Approach to Continuous Deployment
Favicon
Kustomize and Helm together
Favicon
GitOps no Amazon EKS com ArgoCD [Lab Session]
Favicon
Using CDK8S, YTT or Gomplate with ArgoCD Through "Config Management Plugins"
Favicon
Dominando GitOps con ArgoCD: Una guรญa prรกctica para kubernetes
Favicon
Extending GitOps: Effortless continuous integration and deployment on Kubernetes
Favicon
Your first ARGO-CD

Featured ones: