{"id":20863900,"url":"https://github.com/eziodevio/gitops-argocd-deployment","last_synced_at":"2026-04-02T01:59:35.370Z","repository":{"id":237821304,"uuid":"795297993","full_name":"EzioDEVio/GitOps-ArgoCD-Deployment","owner":"EzioDEVio","description":"Argo CD, leveraging the GitOps methodology","archived":false,"fork":false,"pushed_at":"2024-05-04T18:57:28.000Z","size":461,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-19T08:16:22.779Z","etag":null,"topics":["argocd","gitops","gitops-deploy-repo","kubernetes-cluster","kubernetes-deployment"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EzioDEVio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-03T01:23:05.000Z","updated_at":"2024-11-07T02:16:24.000Z","dependencies_parsed_at":"2024-05-03T08:50:12.374Z","dependency_job_id":"01dc156a-4440-447a-9a0b-b22480fa4edc","html_url":"https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment","commit_stats":null,"previous_names":["eziodevio/gitops-argocd-deployment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EzioDEVio%2FGitOps-ArgoCD-Deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EzioDEVio%2FGitOps-ArgoCD-Deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EzioDEVio%2FGitOps-ArgoCD-Deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EzioDEVio%2FGitOps-ArgoCD-Deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EzioDEVio","download_url":"https://codeload.github.com/EzioDEVio/GitOps-ArgoCD-Deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243236658,"owners_count":20258881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","gitops","gitops-deploy-repo","kubernetes-cluster","kubernetes-deployment"],"created_at":"2024-11-18T05:34:09.845Z","updated_at":"2025-12-26T05:59:22.429Z","avatar_url":"https://github.com/EzioDEVio.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitOps with ArgoCD kubernetes Deployment](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/argocd.yml/badge.svg)](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/argocd.yml)  [![KubeLinter Scan](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/KubeLinter.yml/badge.svg)](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/KubeLinter.yml)  [![Checkov Security Scan](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/Checkov.yml/badge.svg)](https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment/actions/workflows/Checkov.yml) \n\n# Deploying a Node.js App on Kubernetes with Argo CD 🚀\n\nThis guide walks you through deploying a Node.js application using Minikube and Argo CD, leveraging the GitOps methodology. By the end of this tutorial, you'll have a solid understanding of deploying applications on Kubernetes with automatic syncing through Argo CD.\n\n## Prerequisites 📋\n\nBefore you start, make sure you have the following installed on your local machine:\n\n- Docker 🐳\n- Minikube 🚤\n- kubectl 🛠️\n- Argo CD CLI 🖥️\n- Git 🌿\n\n## Step 1: Start Minikube\n\nStart your Minikube environment. This is your local Kubernetes cluster, ideal for development and testing.\n\n```bash\nminikube start\n```\n\n## Step 2: Enable Minikube Addons\n\nEnable necessary Minikube addons like the dashboard and ingress to enhance functionality.\n\n```bash\nminikube addons enable dashboard\nminikube addons enable ingress\n```\n\n## Step 3: Install Argo CD\n\nInstall Argo CD on your Minikube cluster using kubectl:\n\n```bash\nkubectl create namespace argocd\nkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml\n```\n\n## Step 4: Access Argo CD\n\nUse port forwarding to access the Argo CD UI through the Minikube IP:\n\n```bash\nkubectl port-forward svc/argocd-server -n argocd 8080:443\n```\n\n**Login Details:**\n- **Username**: admin\n- **Password**: Retrieve the password using:\n  \n  ```bash\n  kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 --decode; echo\n  ```\n\n## Step 5: Create a GitHub Repository\n\nCreate a repository to store your Kubernetes YAML files. This repository will be used by Argo CD to sync your application's state.\n\n1. **Create a new repository** on GitHub.\n2. **Clone your repository**:\n\n```bash\ngit clone https://github.com/EzioDEVio/GitOps-ArgoCD-Deployment.git\ncd GitOps-ArgoCD-Deployment\n```\n\n## Step 6: Add Kubernetes Manifests\n\nCreate `deployment.yaml` and `service.yaml` under a `deployments` directory in your repo, see my other repo for more deep dive and details on how to deploy kubernetes cluster with yaml files manifsts:\n\n**Example:**\n\n**deployment.yaml**:\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: yourusername/yourapp:latest\n        ports:\n        - containerPort: 3000\n```\n\n**service.yaml**:\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: myapp-service\nspec:\n  type: NodePort\n  ports:\n    - port: 3000\n      targetPort: 3000\n      nodePort: 30001\n  selector:\n    app: myapp\n```\n\n## Step 7: Commit and Push Your Changes\n\n```bash\ngit add .\ngit commit -m \"Add Kubernetes deployment manifests\"\ngit push\n```\n\n## Step 8: Configure Argo CD to Monitor Your Repository\n\nCreate an Argo CD application linked to your GitHub repository:\n\n```bash\nargocd app create myapp \\\n  --repo https://github.com/yourusername/yourrepository.git \\\n  --path deployments \\\n  --dest-server https://kubernetes.default.svc \\\n  --dest-namespace default\n```\n\n## Step 9: Sync Your Application\n\nManually sync your application from the Argo CD dashboard, or use the CLI:\n\n```bash\nargocd app sync myapp\n```\n\n## Step 10: Verify Deployment\n\nCheck the deployment status in Argo CD or by using kubectl:\n\n```bash\nkubectl get all\n```\n\n## Accessing the ArgoCD and the app\n\n# List current running pods\n```\nkubectl get pods -n argocd\n```\n\n# Login to argocd an access it in the browser\n```\nkubectl port-forward svc/argocd-server -n argocd 8080:443\n```\n# Open up the localhost on the browser           \n```\nhttps://localhost:8080\n```\n# The default user name is \"admin\" the password can be retrieved by using the following command:\n\n```\nkubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 --decode; echo\n```\n# accessing ArgoCD using the CLI\n```\nargocd login localhost:8080 --username admin --password \u003cthe password from the step above\u003e --insecure\n```\n# Accessing the app you deployed in ArgoCD\n```\nminikube service myapp-service --url -n default\n```\nminikube service myapp-service --url -n default\nhttp://127.0.0.1:58325\n❗  Because you are using a Docker driver on windows, the terminal needs to be open to run it.\n\nThe following url will be the app you deployed to ArgoCD: http://127.0.0.1:58325\n\n## Troubleshooting\n\n# Application Not Accessible:\nCheck if the service is up and NodePort is correctly mapped. Ensure your firewall or network settings are not blocking the connection.\nPods Not Starting:\nIf pods are in a pending or error state:\n```\nkubectl get pods -n default\nkubectl describe pod \u003cpod-name\u003e -n default\n```\n# Service Unreachable:\nVerify Minikube's network settings and ensure the tunnel is running if using minikube service.\nResource Usage Monitoring:\nMonitor resource usage to ensure the application is not consuming excessive resources:\n```\nkubectl top pod \u003cpod-name\u003e -n default\n```\n## Additional Notes\nAlways ensure your Kubernetes environment and tools are up to date.\nBackup important data and configurations regularly.\nFeedback and Contributions\nFeedback and contributions to this project are welcome. Please open an issue or pull request in the GitHub repository.\n\n## Conclusion 🎉\n\nYou now have a Node.js application running on Kubernetes, managed via Argo CD using GitOps principles. This setup exemplifies a modern CI/CD pipeline that is scalable, manageable, and transparent. \n\n\n### Additional Notes\n\n- **Customization**: You may need to replace placeholders (like `your-username/your-repo`) with actual values relevant to your project.\n- **Repository Links**: Adjust links to match the actual URLs where your code and Docker images are hosted.\n- **ArgoCD Configuration Details**: This README assumes ArgoCD is already configured and operational within the cluster. If this is not the case, you might need to include setup details or refer to official ArgoCD documentation for initial setup instructions.\n\nThis README.md provides a comprehensive guide that not only helps users understand how to get the application running but also how to manage deployments through a GitOps workflow using ArgoCD.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feziodevio%2Fgitops-argocd-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feziodevio%2Fgitops-argocd-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feziodevio%2Fgitops-argocd-deployment/lists"}