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: server
        image: nginx:1.20.2
        volumeMounts:
        - name: nginx-config
          mountPath: /etc/nginx/
      - name: metric
        image: nginx/nginx-prometheus-exporter:0.9.0
        args: ['-nginx.scrape-uri', 'http://127.0.0.1:80/basic_status']
      volumes:
        - name: nginx-config
          configMap:
            name: nginx-config
