Skip to content

GitOps: Automating Application Deployment with ArgoCD, Jenkins, Kustomize, and K3d

Notifications You must be signed in to change notification settings

OpsMo/argocd-app

Repository files navigation

GitOps: ArgoCD Application + Jenkins + Kustomize (dev/prod) + K3d

This repository contains configurations for deploying applications using ArgoCD in a Kubernetes environment.

Repository Structure

  • app-ci-image/: Contains Dockerfile and related resources for building the application image.
  • k8s-app-kustomize/: Includes Kustomize overlays for different environments (e.g. dev, prod).
  • argocd-application-dev.yaml: ArgoCD Application manifest for deploying to the development environment.
  • argocd-application-prod.yaml: ArgoCD Application manifest for Production environment.

Prerequisites

  • Kubernetes cluster (e.g., k3d)
  • ArgoCD installed in the cluster
  • kubectl CLI

Getting Started

  1. Clone the repository:

    git clone https://github.com/OpsMo/argocd-app.git
    cd argocd-app
  2. Set up the application image:

    • Navigate to the app-ci-image directory.
    • Build and push the Docker image manually:
      docker build -t your-repo/your-app:latest .
      docker push your-repo/your-app:latest
    • Or - Alternatively, use Jenkins for CI/CD automation. The Jenkinsfile in the app-ci-image directory provides an Example of pipeline configuration. check the Jenkinsfile.
  3. Configure ArgoCD Application:

    • Review and modify argocd-application-dev.yaml as needed.
    • Apply the configuration:
      kubectl apply -f argocd-application-dev.yaml
  4. Access the Application:

    • Use ArgoCD's UI or ku to monitor the deployment. argo-app

      argo-dev-ui

    • Once deployed, access the application via exposed service or configured ingress (K3d comes with Traefik controller). url-argo

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

GitOps: Automating Application Deployment with ArgoCD, Jenkins, Kustomize, and K3d

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published