testing argocd with a sample app

argocd | argocd-test-app | argocd-helm

prepare manifests

any remote machine or the k8s client

create a github repo e.g.

https://github.com/pbraun9/test-argocd

grab it

git clone git@github.com:pbraun9/test-argocd.git
cd test-argocd/

with this content (--path requires dedicated folders per project to deploy)

cd test-app/
cat test-app-deploy.yml

note clusterip might have been enough, as we also point ingress towards test-app above

cat test-app-svc-nodeport.yml

ingress

cat test-app-ingress.yml

deploy the test app

on the k8s client

kubectl config get-contexts
kubectl get ns
kubectl config set-context --current --namespace=argocd

#argocd app delete test-app
argocd app create test-app \
    --repo https://github.com/pbraun9/test-argocd.git \
    --path test-app \
    --dest-server https://kubernetes.default.svc \
    --dest-namespace default
kubectl patch deploy test-app -n default -p '{"spec": {"replicas": 2}}'

sync the app

assuming ingress addon is enabled…

https://localhost:8443/applications

test-app / sync

check

minikube host

kubectl config set-context --current --namespace=default
kubectl get deploy
kubectl get pods
kubectl get svc
kubectl get ingress

acceptance

nodeport (optional)

minikube service test-app --url
curl -i http://192.168.49.2:32234

ingress

minikube host

    curl -i --resolve hello-world.info:80:192.168.49.2 hello-world.info

resources

apps

https://github.com/argoproj/argocd-example-apps/tree/master/guestbook

usage

https://www.shellhacks.com/argocd-use-upsert-flag-to-force-update/

troubles

https://stackoverflow.com/questions/69245492/where-do-i-put-my-nodeport-spec-in-my-deployment-yaml ==> force nodeport

https://stackoverflow.com/questions/75488142/troubleshooting-ingress-stuck-in-progressing-state-in-argocd ==> enable ingress plugin

https://github.com/argoproj/argo-cd/issues/4863#issuecomment-1400786602 ==> enable ingress plugin

moar

https://pradeepl.com/blog/gitops-with-argocd/

https://argo-cd.readthedocs.io/en/stable/operator-manual/tls/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun