How aps31012005-prog/task14_kubernetes_scaling_rolling_updates works
This repository demonstrates a CIFAR-10 image-classification application deployed on Kubernetes. The user uploads an image in Streamlit, which sends it to the Flask prediction API; the API preprocesses it and invokes the CNN model. Separately, an operator manages replicas and rolling updates, then checks availability and resource use. The application flow is visible in the sampled Python files; Kubernetes scaling and monitoring capabilities are documented in the README, but the manifest contents were not sampled.
Main entry points: flask-deployment.yaml Flask Deployment · README.md Availability Checks · app.py Streamlit UI · flask_api.py Flask API
Components 15
Frontend
- Streamlit UI
app.py
Prediction Backend
- Flask API
flask_api.py - CIFAR-10 CNN
model/cifar10_cnn.keras
Kubernetes Runtime
- Flask Deployment
flask-deployment.yaml - Flask Service
flask-service.yaml - Streamlit Deployment
streamlit-deployment.yaml - Streamlit Service
streamlit-service.yaml
Cluster Operations
- Kubernetes Cluster
- Replica Scaling
README.md - Rolling Updates
README.md - Resource Monitoring
README.md - Metrics Server
- Availability Checks
README.md
Other components
- Image Uploader
- Cluster Operator
Connections 16
- Image Uploader → Streamlit UI: uploads image
app.py - Streamlit UI → Flask API: posts image
app.py - Flask API → CIFAR-10 CNN: predicts with
flask_api.py - Cluster Operator → Replica Scaling: scales replicas
README.md - Cluster Operator → Rolling Updates: applies update
README.md - Cluster Operator → Resource Monitoring: checks usage
README.md - Cluster Operator → Availability Checks: verifies service
README.md - Replica Scaling → Flask Deployment: changes replicas
README.md - Rolling Updates → Flask Deployment: updates deployment
README.md - Flask Deployment → Kubernetes Cluster: runs in
README.md - Streamlit Deployment → Kubernetes Cluster: runs in
README.md - Flask Service → Flask Deployment: routes to pods
- Streamlit Service → Streamlit Deployment: routes to pods
- Resource Monitoring → Metrics Server: uses metrics
README.md - Availability Checks → Flask Service: checks access
README.md - Availability Checks → Streamlit Service: checks access
README.md