---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: nginx-upstream2
  name: nginx-upstream2
  namespace: upstream2
spec:
  externalTrafficPolicy: Cluster
  ports:
    # Inside the cluster, what port does the service expose?
  - port: 80
    protocol: TCP
    # Which port do pods selected by this service expose?
    targetPort: 80
  selector:
    app: nginx-upstream2
  sessionAffinity: None
  # Make the service externally visible via the node IP
  type: NodePort