---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: example-app
  labels:
    app: example-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: example-app
  template:
    metadata:
      labels:
        app: example-app
    spec:
      containers:
      - name: nginx
        image: "stitrace/nginx-kubernates-intro:0.0.4"
        imagePullPolicy: Always
        env:
          - name: NGINX_PORT
            value: "8010"
      - name: nginx-exporter
        image: "nginx/nginx-prometheus-exporter:0.8.0"
        imagePullPolicy: Always
        args: ["-nginx.scrape-uri", "http://127.0.0.1:8010/basic_status"]
      serviceAccount: default
