apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-stats
  labels:
    app: nginx-stats
spec:
  selector:
    matchLabels:
      app: nginx-stats
  template:
    metadata:
      name: nginx-stats
      labels:
        app: nginx-stats
    spec:
      containers:
        - name: nginx-stats
          image: wildermesser/nginx-stats:v0.2
          ports:
          - containerPort: 80
            protocol: TCP
        - name: nginx-exporter
          image: nginx/nginx-prometheus-exporter:0.5.0
          env:
            - name: SCRAPE_URI
              value: http://127.0.0.1:80/basic_status
          ports:
          - containerPort: 9113
            protocol: TCP


