apiVersion: v1
kind: Service
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
  labels:
    k8s-app: ingress-nginx
spec:
  type: ClusterIP
  ports:
    - name: metrics
      port: 10254
      targetPort: 10254
  selector:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
#---
#apiVersion: v1
#kind: Endpoints
#metadata:
#  labels:
#    k8s-app: ingress-nginx
#  name: ingress-nginx
#  namespace: ingress-nginx
#subsets:
#- addresses:
#  - ip: 192.168.20.31 # change to your node deployed ingress-nginx ip
#  - ip: 192.168.20.30 # change to your node deployed ingress-nginx ip
#  ports:
#  - name: metrics
#    port: 10254
#    protocol: TCP
