apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: tomcat
spec:
  replicas: 1
  template:
    metadata:
      labels:
        run: tomcat
    spec:
      containers:
        - image: tomcat
          name: tomcat
          ports:
          - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: tomcat
spec:
  ports:
    - protocol: TCP
      port: 8080
  type: NodePort
  selector:
     run: tomcat
