Skip to content

Latest commit

 

History

History
104 lines (68 loc) · 2.81 KB

File metadata and controls

104 lines (68 loc) · 2.81 KB

Configuring ArgoCD using Operators in a Kubernetes Cluster

Prerequisites

Before we begin, make sure you have the following prerequisites in place:

  1. Kubernetes Cluster: Ensure you have a functioning Kubernetes cluster.

  2. kubectl: Make sure you have kubectl installed and configured to access your cluster.

  3. Operator Lifecycle Manager (OLM): We'll need OLM to install the ArgoCD Operator. You can install it by running the following command:

    curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/install.sh | bash -s v0.25.0

Install the ArgoCD Operator

To install the ArgoCD Operator, follow these simple steps:

  1. Run the following command:

    kubectl create -f https://operatorhub.io/install/argocd-operator.yaml
  2. The ArgoCD Operator will be installed in the "operators" namespace and will be available for use in all namespaces within your cluster.

  3. You can check the installation progress by running:

    kubectl get csv -n operators

Deploy the ArgoCD Controller

Now, let's deploy the ArgoCD Controller as a pod in your cluster:

  1. Create a file named argo-cd.yml with the following content:

    apiVersion: argoproj.io/v1alpha1
    kind: ArgoCD
    metadata:
      name: example-argocd
      labels:
        example: basic
    spec: {}
  2. Apply the configuration using this command:

    kubectl apply -f argo-cd.yml
  3. After the deployment is successful, check the pods and services created for the ArgoCD Controller:

    kubectl get pods -A
    kubectl get svc -A

Accessing the ArgoCD Controller UI

Change the service type to NodePort

kubectl edit svc example-argocd-server

Run the above command, and look for type: ClusterIP and change it type: NodePort

Generate a URL for accessing the UI

minikube service example-argocd-server

Copy the url and paste in the web browser to access the argocd UI.

Obtaining ID and Password

To get the login credentials for ArgoCD, follow these steps:

  1. Retrieve the secrets for the ArgoCD cluster:

    kubectl get secrets example-argocd-cluster -o yaml
  2. Locate the admin.password field in the data block of the output. This is your encoded password.

  3. Decode the password using the following command:

    echo <copied-password-here> | base64 -d
  4. Copy the generated output, excluding any trailing character ie; (%). This is your ArgoCD password for admin user. Use admin in the id field and click on signin.

    ArgoCD UI Access

With these steps completed, you should now have access to the ArgoCD Controller UI.


Previous | Next