apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: nginx
        image: izhur85/nginx:0.0.2
        ports:
        - name: web
          containerPort: 8000
          protocol: TCP
        livenessProbe:
          tcpSocket:
            port: 8000
        readinessProbe:
          httpGet:
            path: /index.html
            port: 8000
      - name: exporter
        image: nginx/nginx-prometheus-exporter:0.9.0
        ports:
        - name: metrics
          containerPort: 9113
          protocol: TCP
        args: ['-nginx.scrape-uri', 'http://127.0.0.1:8000/basic_status']
