How aps31012005-prog/task_12_kubernetes_cluster_setup_and_deployment works
This repository deploys a CIFAR-10 image-classification application: a user uploads an image through Streamlit, which calls a Flask prediction API that preprocesses the image, invokes the trained CNN, and returns a class and confidence. Kubernetes manifests deploy and expose the frontend and backend. The API and frontend behavior are supported by sampled source; Kubernetes relationships and configuration are described in the README, while manifest internals were not sampled.
Main entry points: flask_api.py Flask prediction API · app.py Classification dashboard · 1_Image_Prediction.py Prediction page · flask-service.yaml Flask service
Components 11
Streamlit Frontend
- Classification dashboard
app.py - Prediction page
pages/1_Image_Prediction.py
Prediction Backend
- Flask prediction API
flask_api.py - Image preprocessing
flask_api.py - CNN inference
flask_api.py - Trained CNN model
model/cifar10_cnn.keras
Kubernetes Deployment
- Flask deployment
flask-deployment.yaml - Flask service
flask-service.yaml - Streamlit deployment
streamlit-deployment.yaml - Streamlit service
streamlit-service.yaml
Other components
- Image uploader
Connections 14
- Image uploader → Classification dashboard: uploads image
app.py - Image uploader → Prediction page: uploads image
pages/1_Image_Prediction.py - Classification dashboard → Flask prediction API: posts image
app.py - Prediction page → Flask prediction API: posts image
pages/1_Image_Prediction.py - Flask prediction API → Image preprocessing: converts image
flask_api.py - Flask prediction API → CNN inference: predicts with
flask_api.py - CNN inference → Trained CNN model: loads model
flask_api.py - Flask prediction API → Classification dashboard: returns JSON
app.py - Flask prediction API → Prediction page: returns JSON
pages/1_Image_Prediction.py - Flask deployment → Flask service: exposes backend
README.md - Streamlit deployment → Streamlit service: exposes frontend
README.md - Streamlit service → Image uploader: serves interface
README.md - Classification dashboard → Flask service: calls service
README.md - Prediction page → Flask service: calls service