From 0c880229ea029961ed5c8f99a7de858f9b4237c6 Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 3 Jun 2026 00:11:46 -0700 Subject: [PATCH 1/3] recursive dirs --- .../bootstrap/manifests.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml diff --git a/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml new file mode 100644 index 0000000..be5b5e5 --- /dev/null +++ b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml @@ -0,0 +1,61 @@ +# Initial Lab Environment: Webapp Horizontal Pod Scaling +# This manifest creates a standalone Pod that needs to be converted to a Deployment + +--- +# Standalone nginx Pod - The "wrong" way to deploy for scaling +# Students will need to convert this to a Deployment to properly scale +apiVersion: v1 +kind: Pod +metadata: + name: webapp + labels: + app: webapp + tier: frontend + version: v1 +spec: + containers: + - name: nginx + image: nginx:1.25 + ports: + - containerPort: 80 + name: http + resources: + requests: + memory: "64Mi" + cpu: "100m" + limits: + memory: "128Mi" + cpu: "200m" + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 3 + periodSeconds: 5 + +--- +# Service to expose the webapp +# This Service is already correctly configured with proper selectors +# It will work with both the original Pod and the future Deployment +apiVersion: v1 +kind: Service +metadata: + name: webapp-service + labels: + app: webapp +spec: + type: ClusterIP + selector: + app: webapp + tier: frontend + ports: + - port: 80 + targetPort: 80 + protocol: TCP + name: http \ No newline at end of file From be83f31a784f08d9c3160208f0a0dc5e2c725106 Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 3 Jun 2026 00:14:06 -0700 Subject: [PATCH 2/3] bad version --- scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml index be5b5e5..ad0bb65 100644 --- a/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml +++ b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml @@ -4,14 +4,14 @@ --- # Standalone nginx Pod - The "wrong" way to deploy for scaling # Students will need to convert this to a Deployment to properly scale -apiVersion: v1 +apiVersion: v2 kind: Pod metadata: name: webapp labels: app: webapp tier: frontend - version: v1 + version: v2 spec: containers: - name: nginx From 9b84eeeb7c1a44da5b0320892d88d913f20a9ab4 Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 3 Jun 2026 00:16:27 -0700 Subject: [PATCH 3/3] fixes --- .../bootstrap/manifests.yaml | 70 +++++++++++-------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml index ad0bb65..acecea4 100644 --- a/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml +++ b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml @@ -2,42 +2,52 @@ # This manifest creates a standalone Pod that needs to be converted to a Deployment --- -# Standalone nginx Pod - The "wrong" way to deploy for scaling -# Students will need to convert this to a Deployment to properly scale -apiVersion: v2 -kind: Pod +apiVersion: apps/v1 +kind: Deployment metadata: name: webapp labels: app: webapp tier: frontend - version: v2 + version: v1 spec: - containers: - - name: nginx - image: nginx:1.25 - ports: - - containerPort: 80 - name: http - resources: - requests: - memory: "64Mi" - cpu: "100m" - limits: - memory: "128Mi" - cpu: "200m" - livenessProbe: - httpGet: - path: / - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: 80 - initialDelaySeconds: 3 - periodSeconds: 5 + replicas: 3 + selector: + matchLabels: + app: webapp + tier: frontend + template: + metadata: + labels: + app: webapp + tier: frontend + version: v1 + spec: + containers: + - name: nginx + image: nginx:1.25 + ports: + - containerPort: 80 + name: http + resources: + requests: + memory: "64Mi" + cpu: "100m" + limits: + memory: "128Mi" + cpu: "200m" + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 3 + periodSeconds: 5 --- # Service to expose the webapp