apiVersion: v1
kind: ReplicationController
metadata:
  name: mavenwebapprc
spec:
  replicas: 3
  selector:
    app: mavenwebapp
  template:
    metadata:
      name: mavenwebapppod
      labels:
        app: mavenwebapp
    spec:
      containers:
      - name: mavenwebapp
        image: dockerhandson/maven-web-app
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: mavenwebapp
spec:
  type: LoadBalancer
  selector:
    app: mavenwebapp
  ports:
  - port: 80
    targetPort: 8080
