---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: somikhaylov/nginx-metric:v1.0.0
          readinessProbe:
            httpGet:
              path: /basic_status
              port: 80
          livenessProbe:
            tcpSocket:
              port: 80
        - name: exporter
          image: nginx/nginx-prometheus-exporter:0.8.0
          args: ["-nginx.scrape-uri", "http://nginx/basic_status"]