Skip to content

This project is a comprehensive guide to setting up and managing Kubernetes clusters using Vagrant, K3s, K3d, and Docker.

Notifications You must be signed in to change notification settings

mamoussa405/Inception-Of-Things

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inception-of-Things

This project covers setting up a virtual environment for Kubernetes deployment using Vagrant, deploying K3s and understanding its Ingress feature, learning how to simplify Kubernetes management with K3d, and implementing CI for working clusters in Docker. Perfect for developers looking to gain hands-on experience with Kubernetes and improve their CI skills.

Prerequisites

Step 1: Create the VMs

  • Clone the repository
  • Run vagrant up in the project directory to create the VMs. This will create two VMs named "mamoussaS" and "mamoussaSW" with dedicated IPs on the eth1 interface. The IP of the first machine (Server) will be 192.168.56.110, and the IP of the second machine (ServerWorker) will be 192.168.56.111.

Step 2: Access the cluster

  • SSH into the "mamoussaS" VM using vagrant ssh mamoussaS
  • Use kubectl commands to interact with the cluster.

In this part of the project, we will be running three simple web applications within a K3s instance on a single virtual machine. The virtual machine will have the latest stable version of K3s installed in server mode.

You will be able to access these applications depending on the HOST used when making a request to the IP address 192.168.56.110. Here is a small example diagram:

K3s_and_three_simple_applications

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.

In Part 3, we will set up a k3d cluster on a virtual machine without using Vagrant. We will also implement continuous integration using Argo CD and deploy and update an application from a public GitHub repository, following the logic illustrated by the diagram below:

K3s_and_three_simple_applications

To set up K3d and Argo CD, follow these steps:

  1. Run the install-tools.sh script to install necessary packages and tools.
  2. Run the start.sh script to set up the k3d cluster and argocd.

This will create two namespaces:

  • The first one will be dedicated to Argo CD.
  • The second one will be named "dev" and will contain an application.

The application will be automatically deployed by Argo CD using the repository https://github.com/mamoussa405/iot-cd-test. The application has two different versions.

You can change the version from the public Github repository https://github.com/mamoussa405/iot-cd-test and check that the application has been correctly updated.

About

This project is a comprehensive guide to setting up and managing Kubernetes clusters using Vagrant, K3s, K3d, and Docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published