apiVersion: apps/v1
kind: Deployment
metadata:
    name: nginx-metrics
    labels:
      app: nginx-metrics 
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx-metrics
  template:
    metadata:
      labels:
        app: nginx-metrics
    spec:
      containers:
      - name: nginx-metrics
        image: irqoff/otus_k8s_monitoring
        ports:
        - containerPort: 80
      - name: nginx-prometheus-exporter
        image: nginx/nginx-prometheus-exporter:0.10.0
        env:
          - name: SCRAPE_URI
            value: "http://127.0.0.1:8080/basic_status"
        ports:
        - containerPort: 9113
