Bootstrapping K3S/K8S using ArgoCD. Inspired by the postings in the references section.
- K3D: k3d is a lightweight wrapper to run k3s (Rancher Lab’s minimal Kubernetes distribution) in docker.
- kubectl: The kubectl command line tool lets you control Kubernetes clusters.
- kustomize: Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications.
- K9S CLI: K9s is a terminal based UI to interact with your Kubernetes clusters.
- xip.io: xip.io is a magic domain name that provides wildcard DNS. You don't need to install anything for this.
└── K3D ──> MetalLB ──> Deploy ArgoCD using Kustomize
├──> Deploy ArgoCD
└──> Deploy ArgoCD APP - bootstrap-cluster Helm chart
├──> Deploy namespace.yaml
├──> Deploy ArgoCD APP - ingress-nginx-app Helm chart
├──> Deploy ArgoCD APP - cert-manager-app Helm chart
│ ├──> Deploy cert-manager
│ └──> Create letsencrypt cluster issuer
├──> Deploy ArgoCD APP - k8s-config-app Helm chart
├──> Deploy ArgoCD APP - argocd-ingress-app Helm chart
└──> Deploy ArgoCD APP - kube-prometheus-stack-app Helm chart
- Provision K3S cluster
make provision-dev-cluster
- Install metallb
make install-metallb
- Configure tuntap
Mac only
make configure-tuntap
The script is from K3s with k3d and MetalLB. Refer to this article for more details.
- argocd-bootstrap Run one more time if it fails with the below error.
error: unable to recognize "STDIN": no matches for kind "Application" in version "argoproj.io/v1alpha1"
make argocd-bootstrap
The kustomize script for ArgoCD and folder structure is from Bootstrap a kubernetes cluster with ArgoCD and Istio.
- Monitor using K9S
k9s
- Set a temporary argocd password
make set-argocd-password
- Check Ingress
❯ kubectl -n argocd get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
argocd-server-ingress <none> * 172.18.0.3 80 158m
- Log into argocd UI Open web browser and type /argo-cd
172.18.0.3/argo-cd
- Check Ingress
I registered both 172.18.0.3 and 172.18.0.4 since external IP of ingress-nginx-controller is one of them most of the time.
❯ kubectl -n monitoring get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
kube-prometheus-stack-alertmanager <none> alertmanager.172.18.0.3.xip.io,alertmanager.172.18.0.4.xip.io 172.18.0.3 80 37m
kube-prometheus-stack-grafana <none> grafana.172.18.0.3.xip.io,grafana.172.18.0.4.xip.io 172.18.0.3 80 37m
kube-prometheus-stack-prometheus <none> prometheus.172.18.0.3.xip.io,prometheus.172.18.0.4.xip.io 172.18.0.3 80 105s
- Log into UI Open web browser and type
make cleanup


