apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
     app: web
  template:
    metadata:
      name: web
      labels:
        app: web
    spec:
      containers:
        - name: web
          image: dkamovsky/nginx_with_basic_status:v0.2
          livenessProbe:
            tcpSocket:
              port: 80
          readinessProbe:
            httpGet:
              path: /index.html
              port: 80
          resources:
            requests:
              memory: "512Mi"
              cpu: "250m"
            limits:
              memory: "1024Mi"
              cpu: "500m"
        - name: nginx-exporter
          image: nginx/nginx-prometheus-exporter:0.7.0
          args:
            - "-nginx.scrape-uri"
            - "http://localhost/basic_status"
          resources:
            requests:
              memory: "512Mi"
              cpu: "250m"
            limits:
              memory: "1024Mi"
              cpu: "500m"
