Run Argo CD on Kubernetes and EKS for GitOps, and use the argocd, helm, and kustomize CLIs.
259
Run Argo CD on Kubernetes and EKS for GitOps, and use the argocd, helm, and kustomize CLIs.
This image is the official Argo CD image
quay.io/argoproj/argocd at the newest stable release, v3.5.6. The build does not change
it. Each build runs the smoke test and publishes the tested image. The upstream latest
tag is a nightly build, so this image follows the stable releases instead.
One image contains all parts of Argo CD:
argocd command, and helm, kustomize, and git, which the repo server uses to
render manifests.The image runs as the user argocd (UID 999). Copy it to Amazon ECR with
aws/copy-to-ecr.sh.
| Tag | Meaning | Platform |
|---|---|---|
latest | Latest successful build from main with the newest stable Argo CD release. | linux/amd64 |
View all tags on Docker Hub.
The latest tag changes when a new build passes its tests.
docker pull stden/argocd:latest
The files in this tutorial are in the docker-gems repository. Run the commands from its root. For steps 2 to 6, a Kubernetes cluster is necessary, for example the EKS cluster of the AWS guide.
Write an Argo CD Application. Then render the manifests as the repo server does:
docker run --rm stden/argocd:latest argocd admin app generate-spec java-eks \
--repo https://github.com/stden/docker-gems.git --path java-eks/kubernetes \
--dest-server https://kubernetes.default.svc --dest-namespace eks-demo \
--sync-policy automated --self-heal --auto-prune
docker run --rm -v "$PWD":/work -w /work stden/argocd:latest kustomize build java-eks/kubernetes
docker run --rm -v "$PWD":/work -w /work stden/argocd:latest helm template demo ./my-chart
If kustomize build or helm template fails on your computer, Argo CD cannot sync the
application either.
argocd/kubernetes
installs the upstream manifest of the same version with this image. It also puts the
pods on amd64 nodes. The namespace enforces the restricted Pod Security Standard. The
Argo CD CRDs are too large for a client-side apply. Use a server-side apply:
kubectl apply -k argocd/kubernetes --server-side --force-conflicts
kubectl -n argocd rollout status deployment/argocd-server --timeout=10m
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath='{.data.password}' | base64 -d; echo
kubectl -n argocd port-forward service/argocd-server 8080:443
Open https://127.0.0.1:8080. Accept the self-signed certificate. Sign in as admin with
that password. Change the password under User Info. Then delete the initial secret:
kubectl -n argocd delete secret argocd-initial-admin-secret.
argocd/applications
has an AppProject and an ApplicationSet. The project allows only this repository and the
four application namespaces. The ApplicationSet makes one Application for each of
open-webui, graphify, codegraph, and java-eks. Each Application applies
<app>/kubernetes from the main branch, and syncs again when git changes or when
somebody changes the cluster by hand.
Create the secrets of the applications first, as in steps 3 and 4 of the AWS guide. Then run these commands:
kubectl apply -f argocd/applications/project.yaml -f argocd/applications/docker-gems.yaml
kubectl -n argocd get applications
The Open WebUI volume has the annotation argocd.argoproj.io/sync-options: Prune=false,
so Argo CD never deletes it during a sync.
Copy the image with aws/copy-to-ecr.sh argocd. Then make a kustomize overlay, as in step 7
of the AWS guide. In the overlay, set newName of stden/argocd to the ECR repository.
Delete the ApplicationSet first, so that Argo CD does not create the applications again.
Then delete the applications with kubectl delete -k <app>/kubernetes. Delete Argo CD last:
kubectl delete -f argocd/applications/docker-gems.yaml -f argocd/applications/project.yaml
kubectl delete -k argocd/kubernetes
main branch. In production, set
targetRevision to a tag or a commit. Also pin the images by digest.default project for real work.argocd admin settings rbac can <role> <action> <resource> <object> --policy-file policy.csv.kubectl port-forward, or an Ingress with a certificate and allowed networks.Prune=false. Make a backup of it
before a change.argocd/Dockerfile and argocd/kubernetes/kustomization.yaml together.The smoke test writes an Application, tests an RBAC policy, renders kustomize and Helm
sources, and starts each component with --help. A kind test installs Argo CD with this
image. It checks that the image and the manifest have the same version. It also checks
that Argo CD deploys java-eks/kubernetes from GitHub.
Content type
Image
Digest
sha256:cddac32c8…
Size
209.8 MB
Last updated
about 12 hours ago
docker pull stden/argocd