apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: prometheus-service
  namespace: app
  annotations:
    kubernetes.io/ingress.class: nginx    
spec:
  rules:  
    - host: api.contoso.com
    - http:
        paths:
        - backend:
            service:
                name: prometheus-server
                port:
                    number: 9090
          path: /
          pathType: Prefix