Code Monkey home page Code Monkey logo

argocd-demo's Introduction

What is ArgoCD?

Argo CD is a declarative continuous delivery tool for Kubernetes. It can be used as a standalone tool or as a part of your CI/CD workflow to deliver needed resources to your clusters.

In order to manage infrastructure and application configurations aligned with GitOps, your Git repository must be the single source of truth. The desired state of your system should be versioned, expressed declaratively, and pulled automatically. This is where Argo CD comes in.

How to setup ArgoCD on Mac M3?

  1. Install Docker Desktop for Apple Silicon from here.

  2. Run Docker Desktop, click on the "Settings" button on top right and enable Kubernetes as depicted in the image below:

    Enable Kubernetes

  3. Then enter the commands below in your terminal for Non High Availability (Non HA) setup:

    minikube start
    
    kubectl create ns argocd
    
    kubectl apply -n argocd https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    
    kubectl get pods -n argocd
    
    

    The result of the commands should look like:

    Get Pods

  4. ArgoCD can be used now and one can start deploying applications.

How to access ArgoCD server?

By default ArgoCD is not exposed (with external endpoint) outside the cluster. Expose it by using:

  • LoadBalancer
    • Change the argocd-server service type to LoadBalancer if managed Kubernetes services are used in cloud (AWS, Azure etc.)
  • Ingress: Use your preferred ingress controller
    • Create and ingress resource that point into argocd-server service
  • Port-forward: it is simply used to access ArgoCD locally on your machine

How to access ArgoCD Web UI?

  • Port-forwarding will be used to access ArgoCD Web UI locally

    kubectl port-forward svc/argocd-server -n argocd 8080:443
    
  • Get the initial admin password by using the command below:

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

    The result of the commands should look like:

    Get Secret

    The decoded admin password is w68SPMKlm1lIC60q.

    Now if you open your browser and enter https://localhost:8080/. Just bypass the https warning and go to the web page. It should show the login page of ArgoCD Web UI now. Enter "admin" as username and your decoded password to access the Web UI as shown below:

    Get Secret

    After logging in successfully you should see the homepage of the ArgoCD Web UI as shown below:

    Get Secret

How to install ArgoCD CLI in Mac?

  • There are 3 options to interact with ArgoCD

    • CLI
    • Web UI
    • Rest/gRPC API


  • CLI is useful when you need to interact with ArgoCD in CI/CD pipelines. You can manage everything by using it such as:

    • Managing applications
    • Managing repos
    • Managing clusters
    • Managing projects
    • Doing administrative tasks etc.
  • ArgoCD CLI can be installed into all platforms. In order to install it on Mac, the below command can be used:

    brew install argocd
    

  • After installing it, it is needed to login to ArgoCD Server before using any commands. The login command is as follows:

    argocd login <ARGOCD_SERVER>
    

    In order to login to the locally running instance enter the command below in your terminal:

    argocd login localhost:8080
    

    It will prompt to enter username and password. They are the same as the ones that you used to login to the Web UI. Enter those values and it will login.

  • After successful login, you can try using commands like:

    argocd cluster list
    




Resources

  1. https://www.redhat.com/en/topics/devops/what-is-argocd
  2. https://www.udemy.com/course/argo-cd-essential-guide-for-end-users-with-practice/

argocd-demo's People

Contributors

emredenizozer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.