Virtualbox, vagrant, kubectl, helm, argocd cli, docker, k3d, curl.
Also, the following helm repos and plugin are need
helm repo add valkey https://valkey.io/valkey-helm/
helm plugin install https://github.com/aslafy-z/helm-git
helm repo add garage "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git@script/helm?ref=v2.2.0"Two node k3s cluster. Nodes are Debian 13.1 virtual machines created and configured with vagrant. This setup has no workload.
From the project root, run:
cd p1
vagrant up
vagrant ssh almarcosSThe control plane is available at 192.168.56.110 and the worker node at
192.168.56.111.
To list cluster nodes
vagrant ssh almarcosS
kubectl get nodes -o wideTo stop and remove the virtual machines:
vagrant halt
vagrant destroy -fSingle node k3s cluster with three deployments, one of them with 3 replicas, and ingress with Host based rules.
The project deploys three applications:
app1.com: onehttp-echoreplicaapp2.com: threenginxdemos/helloreplicasapp3.com: onehttp-echoreplica
All applications use ClusterIP Services and are routed by the Ingress
according to the HTTP Host header.
Add the following entry to the host machine's /etc/hosts file:
192.168.56.110 app1.com app2.com app3.com
Start the VM:
cd p2
vagrant upConnect to the VM:
vagrant ssh vde-freiSApply the Kubernetes manifests:
kubectl apply -f /vagrant/confs/Check the Pods:
kubectl get podsTest the applications from the host machine:
curl http://app1.com
curl http://app2.com
curl http://app3.comThe VM is available at 192.168.56.110.
To stop or remove the VM:
vagrant halt
vagrant destroy -fSingle node k3d cluster, with argocd and dev namespaces. ArgoCD CRD and application will-playground (p3/confs/will42.yaml) are installed at argocd and will monitor deployment.yaml for new commits, automatically deploying new infras on dev.
curl -w '\n' http://0.0.0.0:30888
{"status":"ok", "message": "v2"}After chaning deployment.yaml to use image: wil42/playground:v1
curl -w '\n' http://0.0.0.0:30888
{"status":"ok", "message": "v1"}From the project root:
cd p3/scripts
chmod +x install_dependencies.sh setup_argocd.sh
./setup_argocd.shArgoCD web interface are available at:
https://127.0.0.1:30777
Login with:
Username: admin
Password: value printed by setup_argocd.sh
To inspect the cluster and deployed application:
kubectl get nodes
kubectl get all -n argocd
kubectl get all -n devTo test workload, see Example automatic worload update
To delete the local k3d cluster:
k3d cluster deleteSingle node k3d cluster, Gitlab's helm chart installed and configured, ArgoCD will not more watch remote Github repo, but the one we created in local Gitlab.
- Config Gitlab's helm chart and its dependencies.
- Postgres 17 with CloudNativePG operator
- Valkey chart
- Garage object store chart
- ArgoCD application to monitor repo on local Gitlab.
Run the setup script from its directory:
cd bonus/scripts
chmod +x setup_gitlab.sh setup_garage.sh
./setup_gitlab.shsetup_gitlab.sh creates k3d cluster, installs Gitlab and its dependencies, install ArgoCD, create will-playground ArgoCD's application, adds the GitLab CA certificate to the host trust store, make argocd trust Gitlab certificate. It also prints the GitLab and ArgoCD credentials to loging in web interfaces.
GitLab is available at:
https://gitlab.10.0.2.15.nip.io
Open it in browser, and create repo ArgoCD will watch. Repo should be named vde-frei and have
manifests folder, like ArgoCD application expects
# bonus/confs/will42.yaml
source:
repoURL: https://gitlab.10.0.2.15.nip.io/root/vde-frei.git
targetRevision: HEAD
path: manifests To test workload, see Example automatic worload update
To delete entire project, delete the cluster
k3d cluster delete
