This repository demonstrates how to deploy and manage a simple Grade Submission API on Kubernetes using Argo CD and GitOps principles, implemented through three approaches: a basic Kubernetes application, Kustomize, and a Helm chart.
-
A GitHub account
https://github.com/
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
kubectl create namespace argocd
helm install argocd argo/argo-cd --namespace argocdVerify the installation:
kubectl get pods -n argocdkubectl port-forward svc/argocd-server -n argocd 8080:443Open in browser:
https://localhost:8080
Retrieve admin password:
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -dLogin credentials:
- Username: admin
- Password: output of the above command
# Add a grade
curl -X POST http://localhost:32000/grades \
-H "Content-Type: application/json" \
-d '{"name": "Aarav", "subject": "Distributed Systems", "score": 91}'
# Add another grade
curl -X POST http://localhost:32000/grades \
-H "Content-Type: application/json" \
-d '{"name": "Meera", "subject": "Cloud Computing", "score": 88}'
# Retrieve all grades
curl http://localhost:32000/grades| Method | Endpoint | Description |
|---|---|---|
| POST | /grades | Create a new grade |
| GET | /grades | Retrieve all grades |