apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
     app: web
  template:
    metadata:
      name: web
      labels:
        app: web
    spec:
      containers:
      - name: web
        image: kshuleshov/otus-kuber-2020-04_kubernetes-monitoring_nginx
        livenessProbe:
          tcpSocket:
            port: 80
        readinessProbe:
          httpGet:
            path: /index.html
            port: 80
      - name: nginx-exporter
        image: nginx/nginx-prometheus-exporter:0.7.0
        args:
        - "-nginx.scrape-uri"
        - "http://localhost/basic_status"
