This repository demonstrates an example of deploying a Go application in Kubernetes using Argo CD, a declarative continuous delivery tool. Argo CD automates the synchronization of your Kubernetes cluster with the desired state defined in a Git repository, ensuring a reliable and automated deployment process.
Before deploying the Go application, ensure you have the following prerequisites:
- Kubernetes cluster up and running
- Argo CD installed in your Kubernetes cluster
To get started with deploying the Go application using Argo CD, follow these steps:
1- Clone this repository:
git clone https://github.com/mahmoudmohamed22/GitOps.git
2- Modify the Kubernetes manifests:
Navigate to the Deployment-App directory. Update the deployment.yaml, service.yaml files with your specific application configurations.
3- Configure Argo CD:
Ensure Argo CD is configured and accessible in your Kubernetes cluster.
Update the application.yaml
file with the correct application and repository details.
4- Push changes to your repository:
Commit and push the modified Kubernetes manifests and the updated application.yaml
file to your repository.
5- Access the Argo CD UI:
- Open the Argo CD UI in your web browser.
- Log in using the appropriate credentials.
- Create an application in Argo CD, specifying the repository and target cluster details.
- Argo CD will automatically detect the changes and begin deploying the Go application to the Kubernetes cluster.
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl port-forward -n argocd svc/argocd-server 8080:443
to get password from secrets and then decode with base64 to solve hashing password to right password
kubectl get secret argocd-initial-admin-secret -n argocd -o yaml
kubectl apply -f application.yaml
Contributions to this repository are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is inspired by the GitOps methodology and leverages the power of Argo CD for automated deployment in Kubernetes.