apiVersion: apps/v1 kind: Deployment metadata: name: ecommerce-web namespace: ecommerce labels: app: ecommerce-web spec: replicas: 2 selector: matchLabels: app: ecommerce-web strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 template: metadata: labels: app: ecommerce-web spec: containers: - name: ecommerce-web # Replace with your actual image name after pushing to a registry # e.g., docker.io//ecommerce-web:latest image: ecommerce-web:latest imagePullPolicy: IfNotPresent ports: - containerPort: 80 protocol: TCP resources: requests: cpu: "100m" memory: "64Mi" limits: cpu: "250m" memory: "128Mi" livenessProbe: httpGet: path: /healthz port: 80 initialDelaySeconds: 10 periodSeconds: 15 failureThreshold: 3 readinessProbe: httpGet: path: /healthz port: 80 initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: false runAsNonRoot: false restartPolicy: Always