apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.20.0
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 80
        resources:
          requests:
            memory: "100Mi"
            cpu: "200m"
          limits:
            memory: "300Mi"
            cpu: "500m"
        readinessProbe:
          httpGet:
            scheme: HTTP
            path: /index.html
            port: http
          initialDelaySeconds: 10
          periodSeconds: 3
        livenessProbe:
          httpGet:
            path: /index.html
            port: http
          failureThreshold: 1
          periodSeconds: 10
