Skip to content

Instantly share code, notes, and snippets.

@colossus06
Created March 19, 2024 21:16
Show Gist options
  • Save colossus06/19da49118fcb3fc6f28b093a76f3953a to your computer and use it in GitHub Desktop.
Save colossus06/19da49118fcb3fc6f28b093a76f3953a to your computer and use it in GitHub Desktop.
#repo for the files: https://github.com/colossus06/Kuberada-Blog-Labs/tree/main/argocd
export ARGO_REPO=<repo_url> # replace woth your repo url
export GH_ADMIN=<ghp_> #replace with your token
export GITHUB_ORG=<github_username>
export AZ_RG=<resource_group>
export CLUSTER=<cluster_name>
echo $ARGO_REPO $GH_ADMIN $GITHUB_ORG $AZ_RG $CLUSTER
az aks get-credentials --resource-group $AZ_RG --name $CLUSTER
#ensure that you have a running kubernetes cluster
kubectl create namespace argocd
kubectl apply -n argocd -f argo-cm-nodeport.yaml
sleep 10
envsubst < repo-secret.yaml | kubectl apply -f -
envsubst < application.yaml | kubectl apply -f -
sleep 25
# Get the secret in YAML format
secret=$(kubectl get secret argocd-initial-admin-secret -n argocd -o yaml | grep password | awk '{print $2}')
# Decode the base64 encoded password
password=$(echo $secret | base64 -d)
echo "ArgoCD password: $password"
k port-forward -n argocd svc/argocd-server 8080:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment