System admin project for 42 school
This project involves deploying two nodes ( server / agent ) using K3s.
Here we have to create with two Virtual Machines via a Vagrantfile and Virtualbox, set up a private network and 192.168.56.110 as IP.
In both VM we have to install K3s, a lightweight Kubernetes distribution, in the one anoted with S we create a server node and in the one anoted with SW we create an agent node.
We respectfully set their IP to 192.168.56.110 and 192.168.56.111
Important
Vagrant does not support latest version of virtual box yet, so you need to download a version < 7.1
Tip
You can check the version of you current virtualbox using virtualbox -h
Here is a link to a supported version of Virtualbox
- Vagrant
- Virtualbox
To start this project you will need to go inside the p1/ folder and use vagrant up.
- Go inside the VM where the server node is setup:
vagrant ssh asimonS - You can check that k3s is installed by using:
k3s -v - Use the kubernetes command:
sudo kubectl get node -o wide
this should prompt:
insert img
This project involves deploying and managing web applications using K3s.
The objective is to set up a K3s instance on a virtual machine of your choice, with the latest stable version of your preferred Linux distribution and K3s installed in server mode.
Once the environment is set up, the project requires you to deploy three web applications of your choice onto the K3s cluster.
These applications should be configured to be accessible via a specific IP address 192.168.56.110.
When a client inputs the ip 192.168.56.110 in his web browser with the HOST app1.com, the server must display the app1.
When the HOST app2.com is used, the server must display the app2.
Otherwise, the app3 will be selected by default
To start this project you will need to go inside the p2/ folder and use vagrant up.
Note
All our confs file for app 1 to 3 and our Ingress are in the confs/ folder.
- Go inside the VM using :
vagrant ssh idouidiSW - Use
sudo kubectl get all -n kube-system
You should have :
insert img