Kubernetes initiation project with K3s, K3d and Vagrant.
git clone https://github.com/adiaz-uf/InceptionOfThings.git
cd InceptionOfThingsInstall Vagrant and VirtualBox if you haven't already.
Vagrant installation example:
wget https://releases.hashicorp.com/vagrant/2.4.1/vagrant_2.4.1-1_amd64.deb
sudo apt install ./vagrant_2.4.1-1_amd64.debVirtualBox installation:
sudo apt install virtualboxSets up two machines running K3s, one as a server and the other as a worker.
cd p1
make
# Connect to the K3s server
make s
# Connect to the K3s worker
make swCreates 3 web applications running on K3s in one virtual machine. You can access them depending on the host used when making a request to the IP address 192.168.56.11. There is app1.com, app2.com, and by default app3.com.
cd p2
make
# Connect to the server
make s
# See the applications
curl -H "Host: app1.com" http://192.168.56.110
curl -H "Host: app2.com" http://192.168.56.110
curl -H "Host: app3.com" http://192.168.56.110
curl -H "" http://192.168.56.110 # Default app (app3.com)You can also choose to modify your /etc/hosts file to see the applications in a web browser.
Without using Vagrant, this part creates a K3d cluster and deploys Argo CD to manage git repositories.
cd p3
make setup
makeOnce deployed:
- ArgoCD: http://localhost:31080
- User:
admin - Password: Run
make passwordto get it
- User:
- Running application: http://localhost:8888
The bonus of the project adds a local Gitlab instance and connects it to Argo CD. This way, any changes pushed to the Gitlab repository will be automatically deployed to the K3d cluster via Argo CD.
cd bonus
make setup
makeOnce deployed:
- GitLab: http://localhost:8080
- User:
root+ password (shown in terminal)
- User:
- ArgoCD: http://localhost:31080
- User:
admin - Password: Run
make passwordto get it
- User:
.
├── p1
│ ├── Makefile
│ ├── scripts
│ │ ├── k3s-server.sh
│ │ └── k3s-worker.sh
│ └── Vagrantfile
├── p2
│ ├── confs
│ │ ├── app1.yaml
│ │ ├── app2.yaml
│ │ ├── app3.yaml
│ │ └── ingress.yaml
│ ├── Makefile
│ ├── scripts
│ │ ├── deploy.sh
│ │ └── setup.sh
│ └── Vagrantfile
├── p3
│ ├── confs
│ │ ├── argocd-server.yaml
│ │ └── wil-app.yaml
│ ├── Makefile
│ └── scripts
│ ├── deploy.sh
│ └── setup.sh
└── bonus
├── confs
│ ├── argocd-server.yaml
│ ├── gitlab-simple.yaml
│ └── will-app.yaml
├── gitlab
│ └── app-manifests
│ ├── deployment.yaml
│ └── README.md
├── Makefile
└── scripts
├── cleanup.sh
├── deploy.sh
├── setup.sh
└── verify.sh
This project was a team effort. You can checkout the team members here: