sk1/README.md

47 lines
2.3 KiB
Markdown
Raw Normal View History

2023-05-13 17:15:43 +00:00
# My Web Application
## Project Description
This project is a simple web application that provides a user interface to manage a MySQL database. The application consists of a single page that allows the user to perform basic CRUD operations on a list of items stored in the database.
Containers
## The application consists of the following containers:
mysql: This container runs the MySQL database server.
web: This container runs the web server and serves the web pages to the user.
## The following Kubernetes objects are used in the application:
PersistentVolume: This object is used to create a named volume for the MySQL data.
StatefulSet: This object is used to manage the mysql container and ensure that there is only one instance running at any given time.
Deployment: This object is used to manage the web container and ensure that there is always at least one instance running.
Service: This object is used to provide access to the mysql and web containers from outside the Kubernetes cluster.
## Virtual Networks and Named Volumes
The application uses a virtual network to allow communication between the mysql and web containers. The mysql container stores its data in a named volume called mysql-persistent-storage.
## Container Configuration
The mysql container is configured to use the mysql-persistent-storage volume for data storage. The web container is configured to connect to the mysql container using the Kubernetes service mysql.
## To run the application, perform the following steps:
1. Install Kubernetes on your machine.
2. Install azure-cli: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
3. Clone the project repository.
4. Change into the project directory.
4. Login in Azure: az login
4. Execute "./prepare-app.sh" make sure it have execution permission.
5. Wait for the mysql and web containers to start.
## To view the application on the web, perform the following steps:
2023-05-13 17:20:27 +00:00
Get the IP address whit this command: kubectl get service phpmyadmin -n ibanweb -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
2023-05-13 17:15:43 +00:00
In your web browser, navigate to http://<web-service-ip>.
## To clean up the application, perform the following steps:
Execute "./remove-app.sh" make sure it have execution permission.