Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moshclouds/managing-kubernetes-deployments-with-argocd
ArgoCD π is a GitOps π tool for Kubernetes βΈοΈ, automating deployments β‘ with real-time monitoring π, rollback π, and multi-cluster management π. This guide covers installing, configuring, and deploying applications using ArgoCD on Minikube π».
https://github.com/moshclouds/managing-kubernetes-deployments-with-argocd
argocd gitops kubernetes minikube
Last synced: 5 days ago
JSON representation
ArgoCD π is a GitOps π tool for Kubernetes βΈοΈ, automating deployments β‘ with real-time monitoring π, rollback π, and multi-cluster management π. This guide covers installing, configuring, and deploying applications using ArgoCD on Minikube π».
- Host: GitHub
- URL: https://github.com/moshclouds/managing-kubernetes-deployments-with-argocd
- Owner: moshclouds
- Created: 2025-02-05T12:13:54.000Z (7 days ago)
- Default Branch: master
- Last Pushed: 2025-02-05T13:38:38.000Z (7 days ago)
- Last Synced: 2025-02-05T14:33:36.603Z (7 days ago)
- Topics: argocd, gitops, kubernetes, minikube
- Language: Mustache
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Managing-Kubernetes-Deployments-with-ArgoCD
![]()
## π₯ Introduction
ArgoCD π is a powerful, declarative GitOps π continuous delivery tool designed for Kubernetes βΈοΈ, enabling seamless automatic deployment β‘ and lifecycle management of applications. It ensures that the desired application state, defined in a Git repository π, is automatically synchronized with the actual state in a Kubernetes cluster ποΈ. This makes deployments more reliable, automated, and version-controlled β . With ArgoCD, teams can achieve real-time monitoring π, rollback capabilities π, and multi-cluster management π, enhancing both security π and efficiency in DevOps workflows.
In this beginner-friendly guide π, we will walk through the installation and configuration of ArgoCD on Minikube π», a lightweight Kubernetes environment ideal for testing and development. We will then demonstrate how to deploy an application π, monitor its deployment status β , and expose it for external access π. By the end of this guide, you will have a fully functional ArgoCD setup π―, understand its key features, and be equipped to manage Kubernetes applications declaratively using GitOps principles π₯.
This guide is **beginner-friendly** and covers essential steps in detail. π―
---
## β Prerequisites
Ensure you have the following installed:
- **Minikube** ([Install Guide](https://minikube.sigs.k8s.io/docs/start/))
- **kubectl** ([Install Guide](https://kubernetes.io/docs/tasks/tools/))To verify Minikube installation:
```sh
minikube version
```---
## βοΈ Step 1: Start Minikube
Start your Minikube cluster:
```sh
minikube start
```Check the status:
```sh
minikube status
```---
## π¦ Step 2: Create Namespaces
Create a namespace for ArgoCD:
```sh
kubectl create namespace argocd
```Create a namespace for applications:
```sh
kubectl create namespace argocd-apps
```---
## π Step 3: Install ArgoCD
Apply the ArgoCD installation manifest:
```sh
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
```Verify installation:
```sh
kubectl get pods -n argocd -w
```Check services:
```sh
kubectl get svc -n argocd
```---
## π Step 4: Expose ArgoCD Server
By default, the ArgoCD server runs as a ClusterIP service. Change it to **NodePort**:
```sh
kubectl edit svc argocd-server -n argocd
```Locate `type: ClusterIP` and change it to `type: NodePort`. Save and exit.
Expose the ArgoCD server:
```sh
minikube service argocd-server -n argocd
```You will receive a URL similar to:
```
http://127.0.0.1:6516
```
Use this URL to access the ArgoCD dashboard. π―---
## π Step 5: Retrieve ArgoCD Admin Password
Find the secret containing the initial admin password:
```sh
kubectl get secrets -n argocd
```Edit the secret file:
```sh
kubectl edit secret argocd-initial-admin-secret -n argocd
```Decode the base64 password using or any other third party services:
```sh
echo | base64 --decode
```Use `admin` as the username and the decoded password to log in.
---
## π Step 6.1: Deploy Application via ArgoCD(CLI)
1οΈβ£ **Login to ArgoCD CLI**:
```sh
argocd login :
```2οΈβ£ **Create an Application in ArgoCD**:
```sh
argocd app create "hello-argocd" \
--repo https://github.com/argoproj/argocd-example-apps.git \
--path guestbook \
--dest-server https://kubernetes.default.svc \
--dest-namespace argocd-apps
```3οΈβ£ **Sync the Application**:
```sh
argocd app sync "hello-argocd"
```4οΈβ£ **Verify Application Status**:
```sh
kubectl get pods -n argocd-apps
```---
## π₯οΈ Step 6.2: Deploy Application via ArgoCD (GUI)
1οΈβ£ **Access ArgoCD Web UI**:
Open the ArgoCD dashboard in your browser using the URL from Step 4:
```
http://127.0.0.1:6516
```
2οΈβ£ **Login**:
Use `admin` as the username and the password obtained in Step 5.3οΈβ£ **Create an Application**:
- In the ArgoCD dashboard, click on **+ NEW APP**.
- In the **Application Name** field, enter```sh
hello-argocd
```
- Set the **Project** to```sh
default
```
- Under **Repository URL**, enter```sh
https://github.com/argoproj/argocd-example-apps.git
```
- Set **Path** to
```sh
guestbook
```
- Set **Destination Cluster** to
```sh
https://kubernetes.default.svc
```
- Set **Namespace** to
```sh
argocd-apps
```Click **Create** to add the application.
4οΈβ£ **Sync the Application**:
Once the application is created, click the **Sync** button on the application details page to sync the app.5οΈβ£ **Verify Application Status**:
You will see the status of your application under **Application Details**. Wait until the status shows as **Synced** and **Healthy**.
---
## π Step 7: Expose the Guestbook Application
Find the service:
```sh
kubectl get svc -n argocd-apps
```Edit the service to get the NodePort:
```sh
kubectl edit svc guestbook-ui -n argocd-apps
```Expose the application:
```sh
kubectl expose service guestbook-ui --type=NodePort --target-port=80 --name=guestbook-ui-ext -n argocd-apps
```Access the application:
```sh
minikube service guestbook-ui-ext -n argocd-apps
```π Your application is now deployed via ArgoCD!
---
## π― Conclusion
Congratulations! You have successfully set up **ArgoCD on Minikube**, deployed an application, and exposed it.
β **Key Takeaways:**
- ArgoCD is a **GitOps continuous delivery tool** for Kubernetes.
- Applications are managed declaratively from a **Git repository**.
- Minikube helps simulate a **real Kubernetes cluster** for testing.π **Next Steps:**
- Explore **Argo Rollouts** for advanced deployment strategies.
- Set up **RBAC and authentication** for ArgoCD security.
- Deploy a **real-world application** using ArgoCD.---
π Useful Links:
- [ArgoCD Docs](https://argo-cd.readthedocs.io/en/stable/)
- [ArgoCD GitHub](https://github.com/argoproj/argo-cd)
- [Minikube Docs](https://minikube.sigs.k8s.io/docs/start/)