apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-server
spec:
  replicas: 2
  selector:
    matchLabels:
      tier: proxy
  template:
    metadata:
      labels:
        tier: proxy
    spec:
      containers:
      - name: my-nginx
        image: nginx:alpine
        ports:
        - containerPort: 80
        resources:
          limits:
            memory: "128Mi"
            cpu: "200m"
        livenessProbe:
          httpGet:
            path: /index.html
            port: 80
          initialDelaySeconds: 15
          timeoutSeconds: 2
          periodSeconds: 5
          failureThreshold: 1
