apiVersion: v1
kind: Service
metadata:
  name: neg-demo-svc # Name of Service
  namespace: doit-lab-15
  annotations:
    cloud.google.com/neg: '{"ingress": true}' # Creates a NEG after an Ingress is created
spec: # Service's specification
  type: ClusterIP # Not a load balancer so has an internal io
  selector:
    run: neg-demo-app # Selects Pods labelled run: neg-demo-app
  ports:
    - name: http
      port: 80 # Service's port. Matches the port defined in the ingress for the backend
      protocol: TCP
      targetPort: 9376
