This project demonstrates how to deploy a basic Flask web application on Kubernetes.
Before you begin, ensure you have the following prerequisites installed:
- Docker
- Kubernetes Cluster
- kubectl
- Git
git clone https://github.com/naknc/kubernetes-flask-project.git
cd kubernetes-flask-project
docker build -t your-docker-username/flask-project:latest .
docker push your-docker-username/flask-project:latest
Replace your-docker-username with your Docker Hub username. Deployment files pull the image from my DockerHub. To change it edit the deployment files accordingly
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
Find the external IP for the service:
kubectl get svc flask-service
Open a web browser and go to http:/// to see the "Great Success" message.
To remove the deployed resources:
kubectl delete -f service.yaml
kubectl delete -f deployment.yaml
This project is under the MIT License. See LICENSE for details.
Flask: Flask Web Framework Kubernetes: Kubernetes Documentation