Last active
February 17, 2022 12:19
-
-
Save ioggstream/dbd0850f53b9b54b56758d593308996a to your computer and use it in GitHub Desktop.
ArgoCD in 5 minutes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install argocd CLI. | |
wget https://github.com/argoproj/argo-cd/releases/download/v2.2.5/argocd-linux-amd64 -O ~/.local/bin/argocd && chmod +x ~/.local/bin/argocd | |
# Run a minikube instance. | |
export CLUSTER_NAME="test-argocd" | |
minikube start --profile "${CLUSTER_NAME}" | |
# Deploy argocd in the `argocd` ns. | |
kubectl create namespace argocd | |
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml | |
# argocd uses CRDs | |
kubectl get crd -n argocd | grep argo | |
# applications.argoproj.io 2022-02-17T09:02:33Z | |
# appprojects.argoproj.io 2022-02-17T09:02:33Z | |
# Switch to the `argocd` ns to allow ./argocd to work | |
# on a given cluster | |
kubectl config set-context --current --namespace=argocd | |
./argocd cluster add "${CLUSTER_NAME}" | |
./argocd app create guestbook \ | |
--repo https://github.com/ioggstream/argocd-example-apps.git \ | |
--path guestbook \ | |
--dest-server https://kubernetes.default.svc \ | |
--dest-namespace default | |
# This will create under `argocd` ns various CRDs. | |
kubectl get applications.argoproj.io -n argocd | |
# NAME SYNC STATUS HEALTH STATUS | |
# guestbook Synced Healthy | |
# List the apps | |
./argocd app list | |
# Download the guestbook app on the argocd. | |
./argocd app get guestbook | |
# Deploy the guestbook app on the `default` ns | |
./argocd app sync guestbook | |
# NAME SYNC STATUS HEALTH STATUS | |
# guestbook Synced Healthy | |
# Check the deployment on the cluster. | |
kubectl get pods -n default | |
kubectl get pods -n default guestbook-ui | |
# Edit the guestbook app on the repo. | |
# https://github.com/ioggstream/argocd-example-apps.git | |
# and sync the changes to the argocd. | |
./argocd app sync guestbook | |
# Now it's healthy. | |
kubectl get applications.argoproj.io -n argocd | |
# Check the deployment on the cluster. | |
# Revert to the default ns. | |
kubectl config set-context --current --namespace=default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment