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..acecea4 --- /dev/null +++ b/scale_the_app_for_upcoming_go-live/bootstrap/manifests.yaml @@ -0,0 +1,71 @@ +# Initial Lab Environment: Webapp Horizontal Pod Scaling +# This manifest creates a standalone Pod that needs to be converted to a Deployment + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: webapp + labels: + app: webapp + tier: frontend + version: v1 +spec: + 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 +# 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