How aps31012005-prog/task_13_kubernetes_deployment works
This repository combines a Streamlit CIFAR-10 image-classification interface with a Flask prediction API and Kubernetes deployment configuration. The main user workflow is upload an image in Streamlit, send it to Flask, preprocess it for the trained CNN, and display the predicted class and confidence. The README documents separate Kubernetes workloads and services, replica scaling, resource limits, and rolling updates. Source excerpts show the application calls; deployment relationships are based on README documentation, since manifest contents were not sampled.
Main entry points: flask_api.py Flask API · streamlit-deployment.yaml Streamlit Deployment · app.py Dashboard and Upload · 1_Image_Prediction.py Prediction Page
Components 11
Streamlit Frontend
- Dashboard and Upload
app.py - Prediction Page
pages/1_Image_Prediction.py
Prediction API
- Flask API
flask_api.py - Image Preprocessing
flask_api.py - CIFAR-10 CNN
model/cifar10_cnn.keras
Kubernetes Workloads
- Flask Deployment
flask-deployment.yaml - Flask Service
flask-service.yaml - Streamlit Deployment
streamlit-deployment.yaml - Streamlit Service
streamlit-service.yaml
Other components
- Browser User
- Kubernetes Cluster
Connections 15
- Browser User → Dashboard and Upload: uses dashboard
README.md - Browser User → Prediction Page: uploads image
pages/1_Image_Prediction.py - Dashboard and Upload → Flask API: checks and predicts
app.py - Prediction Page → Flask API: checks and predicts
pages/1_Image_Prediction.py - Flask API → Image Preprocessing: preprocesses image
flask_api.py - Flask API → CIFAR-10 CNN: runs inference
flask_api.py - Flask API → Dashboard and Upload: returns prediction
app.py - Flask API → Prediction Page: returns prediction
pages/1_Image_Prediction.py - Kubernetes Cluster → Flask Deployment: runs workload
README.md - Kubernetes Cluster → Streamlit Deployment: runs workload
README.md - Flask Deployment → Flask Service: exposed internally
README.md - Streamlit Deployment → Streamlit Service: exposed externally
README.md - Streamlit Service → Browser User: serves browser access
README.md - Flask Service → Flask API: routes API traffic
README.md - Streamlit Deployment → Flask Service: calls API internally
README.md