apiVersion: apps/v1
kind: Deployment
metadata:
  name: backend-deployment
  labels:
    app: backend
spec:
  replicas: 2
  selector:
    matchLabels:
      app: backend
  template:
    metadata:
      labels:
        app: backend
    spec:
      containers:
      - name: backend
        image: michaelnv/python-service-example:latest
        ports:
          - name: web
            containerPort: 80
        livenessProbe:
          httpGet:
            port: 80
            path: /
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 2
        readinessProbe:
          httpGet:
            port: 80
            path: /health
          initialDelaySeconds: 10
          periodSeconds: 5
