Before we begin, make sure you have the following prerequisites in place:
-
Kubernetes Cluster: Ensure you have a functioning Kubernetes cluster.
-
kubectl: Make sure you have
kubectl
installed and configured to access your cluster. -
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
To install the ArgoCD Operator, follow these simple steps:
-
Run the following command:
kubectl create -f https://operatorhub.io/install/argocd-operator.yaml
-
The ArgoCD Operator will be installed in the "operators" namespace and will be available for use in all namespaces within your cluster.
-
You can check the installation progress by running:
kubectl get csv -n operators
Now, let's deploy the ArgoCD Controller as a pod in your cluster:
-
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: {}
-
Apply the configuration using this command:
kubectl apply -f argo-cd.yml
-
After the deployment is successful, check the pods and services created for the ArgoCD Controller:
kubectl get pods -A kubectl get svc -A
kubectl edit svc example-argocd-server
Run the above command, and look for type: ClusterIP
and change it type: NodePort
minikube service example-argocd-server
Copy the url and paste in the web browser to access the argocd UI.
To get the login credentials for ArgoCD, follow these steps:
-
Retrieve the secrets for the ArgoCD cluster:
kubectl get secrets example-argocd-cluster -o yaml
-
Locate the
admin.password
field in the data block of the output. This is your encoded password. -
Decode the password using the following command:
echo <copied-password-here> | base64 -d
-
Copy the generated output, excluding any trailing character ie; (%). This is your ArgoCD password for
admin user
. Useadmin
in the id field and click on signin.
With these steps completed, you should now have access to the ArgoCD Controller UI.