# -------------------
# yaml configuration to define a ClusterIP service for the Bar server
# -------------------

apiVersion: v1
kind: Service

metadata:
  # the namespace is referred
  namespace: foo-bar-nspace
  name: bar-service-cip

spec:
  selector:
    name: bar-service

  # service type is ClusterIP
  type: ClusterIP

  ports:
    # port that can be accessed by other nodes within the cluster
  - port: 4050
    # the target port points to the server's port
    targetPort: 4000
