https://github.com/pedrofurtado/argocd-studies
ArgoCD studies. Just for fun.
https://github.com/pedrofurtado/argocd-studies
Last synced: about 1 month ago
JSON representation
ArgoCD studies. Just for fun.
- Host: GitHub
- URL: https://github.com/pedrofurtado/argocd-studies
- Owner: pedrofurtado
- Created: 2024-04-22T23:30:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-23T02:25:09.000Z (about 1 year ago)
- Last Synced: 2025-01-25T23:55:14.925Z (3 months ago)
- Language: Go
- Size: 215 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ArgoCD studies
Configure CI/CD pipeline + k8s (kind) + ArgoCD + GitOps (in same repo OR in separated repo)
```bash
# Create k8s cluster
kind create cluster
kubectl cluster-info --context kind-kind# Install ArgoCD inside k8s cluster +
# Expose ArgoCD UI to port 3009 +
# Get default UI login credentials
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl port-forward svc/argocd-server -n argocd 3009:443 --address='0.0.0.0'
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo# Access https://localhost:3009 (with HTTPS, oh yeah! xD)
Credentials:
- Username: admin
- Password: Value from k8s secret argocd-initial-admin-secret# Create an app inside ArgoCD UI +
# Configure sync pasting the content of this file in "Edit as YAML" option
# Choose one of the options (GitOps using same repo or separated repo)
argocd_app_with_gitops_in_the_same_repo.yaml
or
argocd_app_with_gitops_in_separated_repo.yaml# Access the go app at http://localhost:3010
kubectl port-forward svc/argocd-studies-goapp-service 3010:8080 --address='0.0.0.0'# Delete the k8s cluster
kubectl delete all --all
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all
kubectl delete all --all --all-namespaces
kind delete cluster
```