CI-CD, especially the CD part with the free and open-source Argo CD.
We will use the free and open-source software ArgoCD.
- Project Homepage: https://argoproj.github.io/cd/
- Documentation: https://argo-cd.readthedocs.io/en/stable/
- Kubernetes Cluster running k3s (v1.23.6 or newer)
- Traefik (v2.5 or newer), Cert-Manager with ClusterIssuer configured
- Kubectl configured
- Public Git Repository on GitHub
*You can still use ArgoCD on other Kubernetes Clusteres like AKS, EKS, GKE, etc.
Create a new namespace argocd and deploy ArgoCD with the web UI included.
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlkubectl create namespace traefik
kubectl get namespaces
helm repo add traefik https://helm.traefik.io/traefik
helm repo update
helm install --namespace=traefik traefik traefik/traefik --values=traefik/values.yaml
kubectl get svc --all-namespaces -o wide
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
kubectl get namespaces
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml
helm install cert-manager jetstack/cert-manager --namespace cert-manager --values=cert-manager/values.yaml --version v1.9.1
kubectl apply -f cert-manager/issuers/letsencrypt-production.yaml
kubectl apply -f cert-manager/certificates/argocd-domain-com.yaml
Create a new IngressRoute object, follow the template described in traefik-ingressroute.yml.
kubectl apply -f argocd/ingress.yml
Edit the --insecure flag in the argocd-server command of the argocd-server deployment.
kubectl -n argocd edit deployment.apps argocd-serverChange the container command from:
...
containers:
- command:
- argocd-server
...To:
...
containers:
- command:
- argocd-server
- --insecure
...Log in to the ArgoCD web interface https://<your-dns-record>/ by using the default username admin and the password, collected by the following command.
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -dAdd your Git Repository in the Settings -> Repositories menu.
Create an Application in ArgoCD to deploy your Git Repository in Kubernetes