Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Runs one Pod of the glassboxml-webapp image and keeps it running.
apiVersion: apps/v1 # API group/version that defines the Deployment resource
kind: Deployment # Resource type: manages a set of identical Pods
metadata:
name: glassboxml-webapp # Name of this Deployment object
spec:
replicas: 1 # Run a single Pod (no redundancy/scaling needed locally)
selector:
matchLabels:
app: glassboxml-webapp # Tells the Deployment which Pods it owns/manages
template: # Pod template used to create each replica
metadata:
labels:
app: glassboxml-webapp # Must match spec.selector.matchLabels above
spec:
containers:
- name: glassboxml-webapp # Name of the container within the Pod
image: glassboxml-webapp # Image built locally via `docker build -t glassboxml-webapp .`
imagePullPolicy: Never # Never pull from a registry — use the image already present in minikube's Docker daemon
ports:
- containerPort: 8000 # Port the FastAPI/uvicorn server listens on inside the container
12 changes: 12 additions & 0 deletions k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Exposes the glassboxml-webapp Pod so it can be reached from outside the cluster.
apiVersion: v1 # Core API group/version that defines the Service resource
kind: Service # Resource type: stable network endpoint in front of Pods
metadata:
name: glassboxml-webapp # Name of this Service object
spec:
type: NodePort # Exposes the Service on a static port on the minikube node itself
selector:
app: glassboxml-webapp # Routes traffic to Pods with this label (must match the Deployment's Pod labels)
ports:
- port: 8000 # Port the Service listens on inside the cluster
targetPort: 8000 # Port on the Pod to forward traffic to (matches containerPort)
Loading