This project demonstrates how to deploy a Django web application on Minikube, a tool that enables you to run Kubernetes locally. The web application is built using Django, a high-level Python web framework.
Before you begin, ensure you have the following prerequisites installed on your local machine:
-
Clone this repository to your local machine:
git clone https://github.com/sohitdeveloper/minikube-python-app.git
-
Navigate to the project directory:
cd minikube-python-app
-
Install the required Python packages:
pip install -r requirements.txt
To run the Django web application locally, use the following command:
python manage.py runserver
This will start the Django development server, and you can access the web application by visiting http://localhost:8000
in your web browser.
To deploy the Django application on Minikube, follow these steps:
-
Start Minikube:
minikube start
-
Build the Docker image:
docker build -t minikube-django-app .
-
Apply the Kubernetes manifests:
kubectl apply -f deployment.yml kubectl apply -f service.yml
-
Access the deployed application:
minikube service minikube-django-app-service
This will open the Django web application in your default web browser.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request.
This project is licensed under the MIT License.
Make sure to replace minikube-django-app
, deployment.yml
, and service.yml
with your actual project name and Kubernetes YAML file names. If you have any further questions or need additional assistance, feel free to ask!