apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  name: echoserver
spec:
  replicas: 1
  template:
    metadata:
      name: echoserver
      labels:
        project: chapter5
        service: echoserver
    spec:
      containers:
      - name: echoserver
        image: gcr.io/google_containers/echoserver:1.4
        ports:
        - containerPort: 8080

---

kind: Service
apiVersion: v1
metadata:
  name: echoserver
spec:
  type: NodePort
  selector:
    project: chapter5
    service: echoserver
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
