Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MiqdadProjects/flask-k8s-minikube-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

46 Commits

Repository files navigation

FLASK APP ON MINIKUBE:

This project demonstrates how to deploy a simple Flask web application in a Kubernetes cluster using Minikube. The app is containerized using Docker and deployed with Kubernetes manifests.

  1. Prerequisites Before you begin, ensure that you have the following installed on your machine:

Docker: https://docs.docker.com/get-docker/

Minikube: https://minikube.sigs.k8s.io/docs/start/

kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/

Git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

  1. Build the Docker Image Build the Docker image from the Dockerfile

     docker build -t flask-app:latest .
    
  2. Run the Flask App Locally If you want to test the app locally before deploying it to Minikube, run it using Docker:

     docker run -p 5000:5000 flask-app 
    
  3. Minikube Deployment

Start Minikube to set up a local Kubernetes cluster:

 minikube start
  1. Apply Kubernetes Manifests

Deploy the Flask app to Minikube using the Kubernetes manifests (deployment.yaml and service.yaml):

 kubectl apply -f deployment.yaml
 kubectl apply -f service.yaml
  1. Access the Flask App via Minikube

    Once the deployment is successful, access the app through Minikube’s exposed NodePort:

     minikube service flask-app-service
    

This will open the app in your default browser at the Minikube IP.

About

SIMPLE FLASK APP DEPLOYED IN KUBERNETES

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /