apiVersion: apps/v1 kind: Deployment metadata: name: math-exercises-app labels: app: math-exercises spec: replicas: 2 selector: matchLabels: app: math-exercises template: metadata: labels: app: math-exercises spec: containers: - name: math-exercises image: math-exercises:latest ports: - containerPort: 8000 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" livenessProbe: httpGet: path: / port: 8000 initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: httpGet: path: / port: 8000 initialDelaySeconds: 5 periodSeconds: 10 --- apiVersion: v1 kind: Service metadata: name: math-exercises-service spec: selector: app: math-exercises ports: - protocol: TCP port: 80 targetPort: 8000 type: ClusterIP