Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active November 22, 2023 17:58
Show Gist options
  • Save vfarcic/84324e2d6eb1e62e3569846a741cedea to your computer and use it in GitHub Desktop.
Save vfarcic/84324e2d6eb1e62e3569846a741cedea to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/84324e2d6eb1e62e3569846a741cedea
####################
# Create a Cluster #
####################
minikube start
#############################
# Deploy Ingress Controller #
#############################
minikube addons enable ingress
kubectl --namespace ingress-nginx wait \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=120s
export INGRESS_HOST=$(minikube ip)
###################
# Install Argo CD #
###################
git clone https://github.com/vfarcic/devops-catalog-code.git
cd devops-catalog-code
git pull
helm repo add argo https://argoproj.github.io/argo-helm
helm upgrade --install argocd argo/argo-cd \
--namespace argocd --create-namespace \
--set server.ingress.hosts="{argocd.$INGRESS_HOST.nip.io}" \
--values argo/argocd-values.yaml --wait
export PASS=$(kubectl --namespace argocd \
get secret argocd-initial-admin-secret \
--output jsonpath="{.data.password}" | base64 -d)
argocd login --insecure --username admin --password $PASS \
--grpc-web argocd.$INGRESS_HOST.nip.io
echo $PASS
argocd account update-password
open http://argocd.$INGRESS_HOST.nip.io
cd ..
#######################
# Destroy The Cluster #
#######################
minikube delete
@vfarcic
Copy link
Author

vfarcic commented Jan 9, 2023

I have too many Gists and it's very hard to keep them up-to-date, so comments like this help a lot. The Gist has been updated. Thanks a ton, @Howard86

@corneliusroemer
Copy link

Some new deprecation notice regarding server.extraArgs."--insecure" :

$ helm upgrade --install argocd argo/argo-cd     --namespace argocd --create-namespace     --set server.ingress.hosts="{argocd.$INGRESS_HOST.nip.io}"     --values argo/argocd-values.yaml --wait
Release "argocd" has been upgraded. Happy Helming!
NAME: argocd
LAST DEPLOYED: Tue Nov 21 23:18:11 2023
NAMESPACE: argocd
STATUS: deployed
REVISION: 2
TEST SUITE: None
NOTES:
DEPRECATED option server.extraArgs."--insecure" - Use configs.params.server.insecure

In order to access the server UI you have the following options:

1. kubectl port-forward service/argocd-server -n argocd 8080:443

    and then open the browser on http://localhost:8080 and accept the certificate

2. enable ingress in the values file `server.ingress.enabled` and either
      - Add the annotation for ssl passthrough: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-1-ssl-passthrough
      - Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts


After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

(You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://argo-cd.readthedocs.io/en/stable/getting_started/#4-login-using-the-cli)

@vfarcic
Copy link
Author

vfarcic commented Nov 22, 2023

It's fixed in the latest commit. Please try it out and let me know whether it works on your end @corneliusroemer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment