Streamlining Your Kubernetes Deployments with Argo CD CLI and UI
Soumyadip Chatterjee
Multi-Cloud Strategist | OCI DevOps Engineer | GenAI Aspired | Ex-TCS | Terraform ??? | Docker ?? | Kubernetes ?? | Snowflake?? | Argo CD ?? | Helm ?? | GitLab ?? | Certified: 2x AWS ??, 1x OCI ??, 1x Commvault | 1xGCP
Argo CD is a powerful and flexible GitOps tool for Kubernetes deployments that automates the deployment and management of applications. It follows the GitOps principles, which means that it uses Git repositories as the single source of truth for the desired state of the applications and the cluster. Argo CD continuously monitors the Git repository for any changes, and compares the current state of the cluster with the desired state defined in the repository.
Now let's walk through step by step how Argo CD can be install in local Ubuntu machine . This can be also applied in any VM or Image belongs to AWS,Azure or GCP .
$ curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
$ chmod +x argocd-linux-amd64
$ sudo mv argocd-linux-amd64 /usr/local/bin/argocd
$ argocd version
6. To view the pods in the argocd namespace, run the following command:
$ kubectl get pods -n argocd
7. To view the services in the argocd namespace, run the following command:
$ kubectl get services -n argocd
8. To view the deployments in the argocd namespace, run the following command:
$ kubectl get deployments -n argocd
9. Log in to the Argo CD server by running the following command:
$ argocd login <ARGOCD_SERVER> --username admin --password <ARGOCD_PASSWORD>
10. You can extract the Argo CD admin password by running the following command:
$ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
11. For Minikube only changed the type as NodePort instead of Cluster IP to browse externally
12. Then execute the below steps to get the local host with port binding to launch the Argo CD UI
13. Copy the above local host URL and it will appear as external browser
14. Post login using Admin privileges and navigate to Application icon you will fill up all of the below CLI arguments and Argo CD application sets will be launched .
15. To create an application via Argo CD CLI . There is a reference of GitHub Repo which you folks can walk through
https://github.com/argoproj/argocd-example-apps.git
16. Now create the application use the below command
argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace default --server https://kubernetes.default.svc
17. Now navigate to same UI and it will display Application set successful launch .
Great insights, Prasenjeet! It's really interesting to see how ITIL and Kanban can complement each other for enhanced agility and collaboration.
?I help Businesses Upskill their Employees in DevOps | DevOps Mentor & Process Architect
1 年Thanks for sharing this insightful post on Argo CD integration with Kubernetes cluster! Your step-by-step commands list is a gold mine for DevOps engineers like me. Keep enlightening us with your expertise in AWS, Docker, Kubernetes, and more. Looking forward to your next knowledge drop!
Busy Simplifying DevOps | Content Creator | Principal Engineer at Red Hat | OpenSource Enthusiast
1 年Thanks alot for the mention
Senior Associate QE L2 at Publicis Sapient
1 年Insightful...Thanks for sharing ????