1.1 KiB
1.1 KiB
Web Application Deployment to Kubernetes
Description
This project deploys a simple web application to Kubernetes using a Deployment, StatefulSet, Service, PersistentVolume, and PersistentVolumeClaim. The application is a basic Node.js server that serves a web page.
Containers Used
- web-app-container: A container running a Node.js application.
Kubernetes Objects
- Namespace:
my-namespace
- Deployment:
web-app-deployment
- StatefulSet:
web-app-statefulset
- Service:
web-app-service
- PersistentVolume:
pv-volume
- PersistentVolumeClaim:
pvc-claim
Virtual Networks and Named Volumes
- The application uses a PersistentVolume and PersistentVolumeClaim to store data.
- The Service exposes the application on port 80.
Container Configuration
- The Dockerfile builds a Node.js application and exposes port 8080.
- The Deployment and StatefulSet use the image
my-web-app:latest
.
Instructions
Prepare the Application
- Run the
prepare-app.sh
script to build the Docker image and create the namespace and persistent volumes.
./prepare-app.sh