argocd
Less than 1 minute
argocd
prepare
- k8s is ready
- helm binary
MIRROR="files." VERSION=v3.13.3 ARCH=$(uname -m) if [ "${ARCH}" = "x86_64" ]; then ARCH_IN_FILE_NAME=linux-amd64 elif [ "${ARCH}" = "aarch64" ]; then ARCH_IN_FILE_NAME=linux-arm64 else echo "NOT SUPPORT: ${ARCH}" fi FILE_NAME=helm-${VERSION}-${ARCH_IN_FILE_NAME}.tar.gz curl -sSLo ${FILE_NAME} "https://${MIRROR}get.helm.sh/${FILE_NAME}" tar zxf ${FILE_NAME} mkdir -p ${HOME}/bin mv -f ${ARCH_IN_FILE_NAME}/helm ${HOME}/bin rm -rf ./${FILE_NAME} rm -rf ./${ARCH_IN_FILE_NAME} chmod u+x ${HOME}/bin/helm
- argocd binary
MIRROR="files." VERSION=v2.9.3 [ $(uname -m) = x86_64 ] && curl -sSLo argocd "https://${MIRROR}github.com/argoproj/argo-cd/releases/download/${VERSION}/argocd-linux-amd64" [ $(uname -m) = aarch64 ] && curl -sSLo argocd "https://${MIRROR}github.com/argoproj/argo-cd/releases/download/${VERSION}/argocd-linux-arm64" chmod u+x argocd mkdir -p ${HOME}/bin mv -f argocd ${HOME}/bin
install
- prepare
argocd.values.yaml
crds: install: true keep: false global: revisionHistoryLimit: 3 image: repository: quay.io/argoproj/argocd imagePullPolicy: IfNotPresent redis: enabled: true image: repository: docker.io/library/redis exporter: enabled: false image: repository: bitnami/redis-exporter metrics: enabled: false redis-ha: enabled: false image: repository: docker.io/library/redis configmapTest: repository: docker.io/koalaman/shellcheck haproxy: enabled: false image: repository: docker.io/library/haproxy exporter: enabled: false image: docker.io/oliver006/redis_exporter dex: enabled: true image: repository: ghcr.io/dexidp/dex
- install argocd with helm
helm install argo-cd argo-cd \ --namespace argocd \ --create-namespace \ --version 5.46.7 \ --repo https://ben-wangz.github.io/helm-chart-mirror/charts \ --values argocd.values.yaml \ --atomic
- prepare
argocd-server-external.yaml
apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/component: server app.kubernetes.io/instance: argo-cd app.kubernetes.io/name: argocd-server-external app.kubernetes.io/part-of: argocd app.kubernetes.io/version: v2.8.4 name: argocd-server-external spec: ports: - name: https port: 443 protocol: TCP targetPort: 8080 nodePort: 30443 selector: app.kubernetes.io/instance: argo-cd app.kubernetes.io/name: argocd-server type: NodePort
- apply
argocd-server-external.yaml
to k8skubectl -n argocd apply -f argocd-server-external.yaml
- get argocd initial password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
- login with argocd cli
FIRST_MASTER_IP=$(kubectl get nodes --selector=node-role.kubernetes.io/control-plane -o jsonpath='{$.items[0].status.addresses[?(@.type=="InternalIP")].address}') argocd login --insecure --username admin $FIRST_MASTER_IP:30443
- login with browser
- open https://k8s-master:30443
- username: admin
- password: the password you get in step 5
- change admin password
- optional for dev environment
argocd account update-password