Difference between revisions of "Kubernetes/ArgoCD"
Jump to navigation
Jump to search
(→Login) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Install cli = | = Install cli = | ||
{{Note|Requires <code>jq</code>}} | |||
<source lang=bash> | <source lang=bash> | ||
REPO=argoproj/argo-cd | REPO=argoproj/argo-cd | ||
Line 8: | Line 9: | ||
curl -L https://github.com/${REPO}/releases/download/v${LATEST}/${REPO_FILE} -o ${TEMPDIR}/${BINARY} | curl -L https://github.com/${REPO}/releases/download/v${LATEST}/${REPO_FILE} -o ${TEMPDIR}/${BINARY} | ||
sudo install ${TEMPDIR}/${BINARY} /usr/local/bin/${BINARY} | sudo install ${TEMPDIR}/${BINARY} /usr/local/bin/${BINARY} | ||
</source> | |||
= Login = | |||
<source lang=bash> | |||
ARGOCD_SERVER=argocd.acme.com | |||
ARGOCD_ADMINPASSWORD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d) | |||
# Usual login | |||
argocd login $ARGOCD_SERVER --username admin --password $ARGOCD_ADMINPASSWORD --grpc-web | |||
# Behind a proxy or ArgoCD is configured only on port 80 (never worked) | |||
argocd login argocd.acme.com --username admin --password $ARGOCD_ADMINPASSWORD --plaintext --port-forward --port-forward-namespace argocd | |||
'admin:login' logged in successfully | |||
Context 'port-forward' updated | |||
</source> | </source> |
Latest revision as of 10:11, 3 May 2024
Install cli
Note: Requires jq
REPO=argoproj/argo-cd REPO_FILE=argocd-linux-amd64 BINARY=argocd LATEST=$(curl --silent "https://api.github.com/repos/${REPO}/releases/latest" | jq -r .tag_name | tr -d v); echo ${LATEST} TEMPDIR=$(mktemp -d) curl -L https://github.com/${REPO}/releases/download/v${LATEST}/${REPO_FILE} -o ${TEMPDIR}/${BINARY} sudo install ${TEMPDIR}/${BINARY} /usr/local/bin/${BINARY}
Login
ARGOCD_SERVER=argocd.acme.com ARGOCD_ADMINPASSWORD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d) # Usual login argocd login $ARGOCD_SERVER --username admin --password $ARGOCD_ADMINPASSWORD --grpc-web # Behind a proxy or ArgoCD is configured only on port 80 (never worked) argocd login argocd.acme.com --username admin --password $ARGOCD_ADMINPASSWORD --plaintext --port-forward --port-forward-namespace argocd 'admin:login' logged in successfully Context 'port-forward' updated