apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  namespace: default
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: abvgdeej/monitorng_hm_nginx
          readinessProbe:
            httpGet:
              path: /basic_status
              port: 8000
          livenessProbe:
            tcpSocket:
              port: 8000
          ports:
            - name: http
              containerPort: 8000
        - name: prometheus
          image: nginx/nginx-prometheus-exporter:0.6.0
          args: ['-nginx.scrape-uri', 'http://localhost:8000/basic_status']
          ports:
            - name: metrics
              containerPort: 9113